Package org.apache.lucene.index
Class IndexFileDeleter.CommitPoint
- java.lang.Object
-
- org.apache.lucene.index.IndexCommit
-
- org.apache.lucene.index.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 Summary
Fields Modifier and Type Field Description (package private) java.util.Collection<IndexFileDeleter.CommitPoint>commitsToDelete(package private) booleandeleted(package private) DirectorydirectoryOrig(package private) java.util.Collection<java.lang.String>files(package private) longgenerationprivate intsegmentCount(package private) java.lang.StringsegmentsFileName(package private) java.util.Map<java.lang.String,java.lang.String>userData
-
Constructor Summary
Constructors Constructor Description CommitPoint(java.util.Collection<IndexFileDeleter.CommitPoint> commitsToDelete, Directory directoryOrig, SegmentInfos segmentInfos)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()Called only be the deletion policy, to remove this commit point from the index.DirectorygetDirectory()Returns theDirectoryfor the index.java.util.Collection<java.lang.String>getFileNames()Returns all index files referenced by this commit point.longgetGeneration()Returns the generation (the _N in segments_N) for this IndexCommitintgetSegmentCount()Returns number of segments referenced by this commit.java.lang.StringgetSegmentsFileName()Get the segments file (segments_N) associated with this commit point.java.util.Map<java.lang.String,java.lang.String>getUserData()Returns userData, previously passed toIndexWriter.setLiveCommitData(Iterable)for this commit.booleanisDeleted()Returns true if this commit should be deleted; this is only used byIndexWriterafter invoking theIndexDeletionPolicy.java.lang.StringtoString()-
Methods inherited from class org.apache.lucene.index.IndexCommit
compareTo, equals, getReader, hashCode
-
-
-
-
Field Detail
-
files
java.util.Collection<java.lang.String> files
-
segmentsFileName
java.lang.String segmentsFileName
-
deleted
boolean deleted
-
directoryOrig
Directory directoryOrig
-
commitsToDelete
java.util.Collection<IndexFileDeleter.CommitPoint> commitsToDelete
-
generation
long generation
-
userData
final java.util.Map<java.lang.String,java.lang.String> userData
-
segmentCount
private final int segmentCount
-
-
Constructor Detail
-
CommitPoint
public CommitPoint(java.util.Collection<IndexFileDeleter.CommitPoint> commitsToDelete, Directory directoryOrig, SegmentInfos segmentInfos) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getSegmentCount
public int getSegmentCount()
Description copied from class:IndexCommitReturns number of segments referenced by this commit.- Specified by:
getSegmentCountin classIndexCommit
-
getSegmentsFileName
public java.lang.String getSegmentsFileName()
Description copied from class:IndexCommitGet the segments file (segments_N) associated with this commit point.- Specified by:
getSegmentsFileNamein classIndexCommit
-
getFileNames
public java.util.Collection<java.lang.String> getFileNames()
Description copied from class:IndexCommitReturns all index files referenced by this commit point.- Specified by:
getFileNamesin classIndexCommit
-
getDirectory
public Directory getDirectory()
Description copied from class:IndexCommitReturns theDirectoryfor the index.- Specified by:
getDirectoryin classIndexCommit
-
getGeneration
public long getGeneration()
Description copied from class:IndexCommitReturns the generation (the _N in segments_N) for this IndexCommit- Specified by:
getGenerationin classIndexCommit
-
getUserData
public java.util.Map<java.lang.String,java.lang.String> getUserData()
Description copied from class:IndexCommitReturns userData, previously passed toIndexWriter.setLiveCommitData(Iterable)for this commit. Map isString -> String.- Specified by:
getUserDatain classIndexCommit
-
delete
public void delete()
Called only be the deletion policy, to remove this commit point from the index.- Specified by:
deletein classIndexCommit
-
isDeleted
public boolean isDeleted()
Description copied from class:IndexCommitReturns true if this commit should be deleted; this is only used byIndexWriterafter invoking theIndexDeletionPolicy.- Specified by:
isDeletedin classIndexCommit
-
-