Class SnapshotDeletionPolicy.SnapshotCommitPoint

    • Constructor Detail

      • SnapshotCommitPoint

        protected SnapshotCommitPoint​(IndexCommit cp)
        Creates a SnapshotCommitPoint wrapping the provided IndexCommit.
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • delete

        public void delete()
        Description copied from class: IndexCommit
        Delete this commit point. This only applies when using the commit point in the context of IndexWriter's IndexDeletionPolicy.

        Upon calling this, the writer is notified that this commit point should be deleted.

        Decision that a commit-point should be deleted is taken by the IndexDeletionPolicy in effect and therefore this should only be called by its onInit() or onCommit() methods.

        Specified by:
        delete in class IndexCommit
      • getFileNames

        public java.util.Collection<java.lang.String> getFileNames()
                                                            throws java.io.IOException
        Description copied from class: IndexCommit
        Returns all index files referenced by this commit point.
        Specified by:
        getFileNames in class IndexCommit
        Throws:
        java.io.IOException
      • getGeneration

        public long getGeneration()
        Description copied from class: IndexCommit
        Returns the generation (the _N in segments_N) for this IndexCommit
        Specified by:
        getGeneration in class IndexCommit
      • getSegmentsFileName

        public java.lang.String getSegmentsFileName()
        Description copied from class: IndexCommit
        Get the segments file (segments_N) associated with this commit point.
        Specified by:
        getSegmentsFileName in class IndexCommit
      • getSegmentCount

        public int getSegmentCount()
        Description copied from class: IndexCommit
        Returns number of segments referenced by this commit.
        Specified by:
        getSegmentCount in class IndexCommit