Class IndexFileDeleter.CommitPoint

  • All Implemented Interfaces:
    java.lang.Comparable<IndexCommit>
    Enclosing class:
    IndexFileDeleter

    private static final class IndexFileDeleter.CommitPoint
    extends IndexCommit
    Holds details for each commit point. This class is also passed to the deletion policy. Note: this class has a natural ordering that is inconsistent with equals.
    • Field Detail

      • files

        java.util.Collection<java.lang.String> files
      • segmentsFileName

        java.lang.String segmentsFileName
      • deleted

        boolean deleted
      • generation

        long generation
      • userData

        final java.util.Map<java.lang.String,​java.lang.String> userData
      • segmentCount

        private final int segmentCount
    • Method Detail

      • toString

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

        public int getSegmentCount()
        Description copied from class: IndexCommit
        Returns number of segments referenced by this commit.
        Specified by:
        getSegmentCount 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
      • getFileNames

        public java.util.Collection<java.lang.String> getFileNames()
        Description copied from class: IndexCommit
        Returns all index files referenced by this commit point.
        Specified by:
        getFileNames in class IndexCommit
      • 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
      • delete

        public void delete()
        Called only be the deletion policy, to remove this commit point from the index.
        Specified by:
        delete in class IndexCommit