org.elasticsearch.index.deletionpolicy
Class SnapshotIndexCommit

java.lang.Object
  extended by org.apache.lucene.index.IndexCommit
      extended by org.elasticsearch.common.lucene.IndexCommitDelegate
          extended by 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()).


Field Summary
 
Fields inherited from class org.elasticsearch.common.lucene.IndexCommitDelegate
delegate
 
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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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.