protected class SnapshotDeletionPolicy.SnapshotCommitPoint extends IndexCommit
| Modifier and Type | Field and Description |
|---|---|
protected IndexCommit |
cp |
| Modifier | Constructor and Description |
|---|---|
protected |
SnapshotDeletionPolicy.SnapshotCommitPoint(IndexCommit cp) |
| Modifier and Type | Method and Description |
|---|---|
void |
delete()
Delete this commit point.
|
Directory |
getDirectory()
Returns the
Directory for the index. |
java.util.Collection<java.lang.String> |
getFileNames()
Returns all index files referenced by this commit point.
|
long |
getGeneration()
Returns the generation (the _N in segments_N) for this
IndexCommit
|
int |
getSegmentCount()
Returns number of segments referenced by this commit.
|
java.lang.String |
getSegmentsFileName()
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 to
IndexWriter.commit(Map) for this commit. |
long |
getVersion()
Returns the version for this IndexCommit.
|
boolean |
isDeleted() |
protected boolean |
shouldDelete(java.lang.String segmentsFileName)
Returns true if this segment can be deleted.
|
java.lang.String |
toString() |
compareTo, equals, getTimestamp, hashCodeprotected IndexCommit cp
protected SnapshotDeletionPolicy.SnapshotCommitPoint(IndexCommit cp)
public java.lang.String toString()
toString in class java.lang.Objectprotected boolean shouldDelete(java.lang.String segmentsFileName)
public void delete()
IndexCommitUpon 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.
delete in class IndexCommitpublic Directory getDirectory()
IndexCommitDirectory for the index.getDirectory in class IndexCommitpublic java.util.Collection<java.lang.String> getFileNames()
throws java.io.IOException
IndexCommitgetFileNames in class IndexCommitjava.io.IOExceptionpublic long getGeneration()
IndexCommitgetGeneration in class IndexCommitpublic java.lang.String getSegmentsFileName()
IndexCommitsegments_N) associated
with this commit point.getSegmentsFileName in class IndexCommitpublic java.util.Map<java.lang.String,java.lang.String> getUserData()
throws java.io.IOException
IndexCommitIndexWriter.commit(Map) for this commit. Map is
String -> String.getUserData in class IndexCommitjava.io.IOExceptionpublic long getVersion()
IndexCommitIndexReader.getVersion() would
return if it were opened on this commit.getVersion in class IndexCommitpublic boolean isDeleted()
isDeleted in class IndexCommitpublic int getSegmentCount()
IndexCommitgetSegmentCount in class IndexCommit