org.apache.lucene.index
Class KeepOnlyLastCommitDeletionPolicy
- java.lang.Object
-
- org.apache.lucene.index.KeepOnlyLastCommitDeletionPolicy
-
- All Implemented Interfaces:
- IndexDeletionPolicy
public final class KeepOnlyLastCommitDeletionPolicy extends java.lang.Object implements IndexDeletionPolicy
ThisIndexDeletionPolicyimplementation 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
Constructors Constructor and Description KeepOnlyLastCommitDeletionPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidonCommit(java.util.List commits)Deletes all commits except the most recent one.voidonInit(java.util.List commits)Deletes all commits except the most recent one.
-
-
-
Method Detail
-
onInit
public void onInit(java.util.List commits)
Deletes all commits except the most recent one.- Specified by:
onInitin interfaceIndexDeletionPolicy- Parameters:
commits- List of currentpoint-in-time commits, sorted by age (the 0th one is the oldest commit).
-
onCommit
public void onCommit(java.util.List commits)
Deletes all commits except the most recent one.- Specified by:
onCommitin interfaceIndexDeletionPolicy- Parameters:
commits- List ofIndexCommitPoint, sorted by age (the 0th one is the oldest commit).
-
-
DataMelt 3.0 © DataMelt by jWork.ORG