All Implemented Interfaces:
Closeable
, AutoCloseable
public abstract class PrimaryNode
extends Node
Node that holds an IndexWriter, indexing documents into its local index.
WARNING: This API is experimental and might change in incompatible ways in the next release.
Field Summary
Fields
Fields inherited from class org.apache.lucene.replicator.nrt.Node
dir , globalStartNS , id , lastFileMetaData , localStartNS , mgr , PRIMARY_GEN_KEY , printStream , searcherFactory , VERBOSE_CONNECTIONS , VERBOSE_FILES , VERSION_KEY
Constructor Summary
Constructors
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods
void
void
boolean
Flush all index operations to disk and opens a new near-real-time reader.
IncRef the current CopyState and return it
long
long
long
Returns the current primary generation, which is incremented each time a new primary is started
for this index
boolean
protected abstract void
Called when a merge has finished, but before IW switches to the merged segment
void
Called once replica is done (or failed) copying an NRT point
Field Details
primaryGen
protected final long primaryGen
Method Details
getPrimaryGen
public long getPrimaryGen ()
Returns the current primary generation, which is incremented each time a new primary is started
for this index
flushAndRefresh
Flush all index operations to disk and opens a new near-real-time reader. new NRT point, to
make the changes visible to searching. Returns true if there were changes.
Throws:
IOException
getCopyStateVersion
public long getCopyStateVersion ()
getLastCommitVersion
public long getLastCommitVersion ()
getCopyState
IncRef the current CopyState and return it
Throws:
IOException
releaseCopyState
Called once replica is done (or failed) copying an NRT point
Throws:
IOException
isClosed
public boolean isClosed ()
Specified by:
isClosed
in class Node
preCopyMergedSegmentFiles
Called when a merge has finished, but before IW switches to the merged segment
Throws:
IOException