Class PrimaryNode

  • 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 Detail

      • primaryGen

        protected final long primaryGen
    • Method Detail

      • getPrimaryGen

        public long getPrimaryGen()
        Returns the current primary generation, which is incremented each time a new primary is started for this index
      • flushAndRefresh

        public boolean flushAndRefresh()
                                throws IOException
        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()
      • releaseCopyState

        public void releaseCopyState​(CopyState copyState)
                              throws IOException
        Called once replica is done (or failed) copying an NRT point
        Throws:
        IOException
      • isClosed

        public boolean isClosed()
        Specified by:
        isClosed in class Node