public abstract class PrimaryNode extends Node
| Modifier and Type | Field and Description |
|---|---|
protected long |
primaryGen |
protected IndexWriter |
writer |
dir, globalStartNS, id, lastFileMetaData, localStartNS, mgr, PRIMARY_GEN_KEY, printStream, searcherFactory, VERBOSE_CONNECTIONS, VERBOSE_FILES, VERSION_KEY| Constructor and Description |
|---|
PrimaryNode(IndexWriter writer,
int id,
long primaryGen,
long forcePrimaryVersion,
SearcherFactory searcherFactory,
java.io.PrintStream printStream) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
commit() |
boolean |
flushAndRefresh()
Flush all index operations to disk and opens a new near-real-time reader.
|
CopyState |
getCopyState()
IncRef the current CopyState and return it
|
long |
getCopyStateVersion() |
long |
getLastCommitVersion() |
long |
getPrimaryGen()
Returns the current primary generation, which is incremented each time a new primary is started for this index
|
boolean |
isClosed() |
protected abstract void |
preCopyMergedSegmentFiles(SegmentCommitInfo info,
java.util.Map<java.lang.String,FileMetaData> files)
Called when a merge has finished, but before IW switches to the merged segment
|
void |
releaseCopyState(CopyState copyState)
Called once replica is done (or failed) copying an NRT point
|
bytesToString, getCurrentSearchingVersion, getDirectory, getSearcherManager, message, name, nodeMessage, nodeMessage, readLocalFileMetaData, toStringprotected final IndexWriter writer
protected final long primaryGen
public PrimaryNode(IndexWriter writer, int id, long primaryGen, long forcePrimaryVersion, SearcherFactory searcherFactory, java.io.PrintStream printStream) throws java.io.IOException
java.io.IOExceptionpublic long getPrimaryGen()
public boolean flushAndRefresh()
throws java.io.IOException
java.io.IOExceptionpublic long getCopyStateVersion()
public long getLastCommitVersion()
public void commit()
throws java.io.IOException
public CopyState getCopyState() throws java.io.IOException
java.io.IOExceptionpublic void releaseCopyState(CopyState copyState) throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionprotected abstract void preCopyMergedSegmentFiles(SegmentCommitInfo info, java.util.Map<java.lang.String,FileMetaData> files) throws java.io.IOException
java.io.IOExceptionCopyright © 2000–2025 The Apache Software Foundation. All rights reserved.