org.elasticsearch.index.deletionpolicy
Class KeepLastNDeletionPolicy

java.lang.Object
  extended by org.elasticsearch.index.shard.AbstractIndexShardComponent
      extended by org.elasticsearch.index.deletionpolicy.KeepLastNDeletionPolicy
All Implemented Interfaces:
org.apache.lucene.index.IndexDeletionPolicy, IndexShardComponent

public class KeepLastNDeletionPolicy
extends AbstractIndexShardComponent
implements org.apache.lucene.index.IndexDeletionPolicy


Field Summary
 
Fields inherited from class org.elasticsearch.index.shard.AbstractIndexShardComponent
componentSettings, indexSettings, logger, shardId
 
Constructor Summary
KeepLastNDeletionPolicy(ShardId shardId, Settings indexSettings)
           
 
Method Summary
 void onCommit(java.util.List<? extends org.apache.lucene.index.IndexCommit> commits)
           
 void onInit(java.util.List<? extends org.apache.lucene.index.IndexCommit> commits)
           
 
Methods inherited from class org.elasticsearch.index.shard.AbstractIndexShardComponent
indexSettings, managementGroupName, nodeName, shardId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeepLastNDeletionPolicy

@Inject
public KeepLastNDeletionPolicy(ShardId shardId,
                                      @IndexSettings
                                      Settings indexSettings)
Method Detail

onInit

public void onInit(java.util.List<? extends org.apache.lucene.index.IndexCommit> commits)
            throws java.io.IOException
Specified by:
onInit in interface org.apache.lucene.index.IndexDeletionPolicy
Throws:
java.io.IOException

onCommit

public void onCommit(java.util.List<? extends org.apache.lucene.index.IndexCommit> commits)
              throws java.io.IOException
Specified by:
onCommit in interface org.apache.lucene.index.IndexDeletionPolicy
Throws:
java.io.IOException