|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.index.KeepOnlyLastCommitDeletionPolicy
public final class KeepOnlyLastCommitDeletionPolicy
This 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.
Constructor Summary | |
---|---|
KeepOnlyLastCommitDeletionPolicy()
Sole constructor. |
Method Summary | |
---|---|
void |
onCommit(List<? extends IndexCommit> commits)
Deletes all commits except the most recent one. |
void |
onInit(List<? extends IndexCommit> commits)
Deletes all commits except the most recent one. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KeepOnlyLastCommitDeletionPolicy()
Method Detail |
---|
public void onInit(List<? extends IndexCommit> commits)
onInit
in interface IndexDeletionPolicy
commits
- List of current
point-in-time commits
,
sorted by age (the 0th one is the oldest commit).public void onCommit(List<? extends IndexCommit> commits)
onCommit
in interface IndexDeletionPolicy
commits
- List of IndexCommit
,
sorted by age (the 0th one is the oldest commit).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |