public class KeepOnlyLastDeletionPolicy
extends org.apache.lucene.index.IndexDeletionPolicy
IndexDeletionPolicy
implementation that
keeps only the most recent commit and immediately removes
all prior commits after a new commit is done. This is
the default deletion policy.Modifier and Type | Field and Description |
---|---|
protected Settings |
indexSettings |
protected ESLogger |
logger |
protected ShardId |
shardId |
Constructor and Description |
---|
KeepOnlyLastDeletionPolicy(ShardId shardId,
IndexSettingsService indexSettingsService) |
KeepOnlyLastDeletionPolicy(ShardId shardId,
Settings indexSettings) |
Modifier and Type | Method and Description |
---|---|
Settings |
indexSettings() |
String |
nodeName() |
void |
onCommit(List<? extends org.apache.lucene.index.IndexCommit> commits)
Deletes all commits except the most recent one.
|
void |
onInit(List<? extends org.apache.lucene.index.IndexCommit> commits)
Deletes all commits except the most recent one.
|
ShardId |
shardId() |
protected final ESLogger logger
protected final ShardId shardId
protected final Settings indexSettings
@Inject public KeepOnlyLastDeletionPolicy(ShardId shardId, IndexSettingsService indexSettingsService)
public void onInit(List<? extends org.apache.lucene.index.IndexCommit> commits)
onInit
in class org.apache.lucene.index.IndexDeletionPolicy
public void onCommit(List<? extends org.apache.lucene.index.IndexCommit> commits)
onCommit
in class org.apache.lucene.index.IndexDeletionPolicy
public ShardId shardId()
shardId
in interface IndexShardComponent
public Settings indexSettings()
indexSettings
in interface IndexShardComponent
public String nodeName()
Copyright © 2009–2016. All rights reserved.