org.elasticsearch.index.deletionpolicy
Class SnapshotIndexCommit
java.lang.Object
org.apache.lucene.index.IndexCommit
org.elasticsearch.common.lucene.IndexCommitDelegate
org.elasticsearch.index.deletionpolicy.SnapshotIndexCommit
- All Implemented Interfaces:
- Comparable<org.apache.lucene.index.IndexCommit>, Releasable
public class SnapshotIndexCommit
- extends IndexCommitDelegate
- implements Releasable
A snapshot index commit point. While this is held and release()
was not called, no files will be deleted that relates to this commit point
(IndexCommitDelegate.getFileNames()
).
Method Summary |
void |
delete()
Override the delete operation, and only actually delete it if it
is not held by the SnapshotDeletionPolicy . |
String[] |
getFiles()
|
boolean |
release()
Releases the current snapshot, returning true if it was
actually released. |
Methods inherited from class org.elasticsearch.common.lucene.IndexCommitDelegate |
equals, getDirectory, getFileNames, getGeneration, getSegmentCount, getSegmentsFileName, getTimestamp, getUserData, getVersion, hashCode, isDeleted |
Methods inherited from class org.apache.lucene.index.IndexCommit |
compareTo |
getFiles
public String[] getFiles()
release
public boolean release()
- Releases the current snapshot, returning
true
if it was
actually released.
- Specified by:
release
in interface Releasable
delete
public void delete()
- Override the delete operation, and only actually delete it if it
is not held by the
SnapshotDeletionPolicy
.
- Overrides:
delete
in class IndexCommitDelegate
Copyright © 2009-2012. All Rights Reserved.