Package org.terrier.realtime.incremental
Class IncrementalDeletePolicy
- java.lang.Object
-
- org.terrier.realtime.incremental.IncrementalDeletePolicy
-
- Direct Known Subclasses:
IncrementalDeleteFixedNumber
public class IncrementalDeletePolicy extends java.lang.Object
This class represents a policy for deleting index shards during a flush. This is useful if you want to want to discard older index shards to avoid the index growing infinitely.- Since:
- 4.0
- Author:
- Richard McCreadie, Stuart Mackie
-
-
Constructor Summary
Constructors Constructor Description IncrementalDeletePolicy()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteIndex(IndexOnDisk index)
boolean
deletePolicy()
No delete.static IncrementalDeletePolicy
get(java.lang.String policy)
protected java.util.List<java.lang.Integer>
getIndicesToDelete(java.util.List<Index> indices)
Get a list of indices to delete (if any)void
runPolicy(java.util.List<Index> indices)
-
-
-
Method Detail
-
get
public static IncrementalDeletePolicy get(java.lang.String policy)
-
deletePolicy
public boolean deletePolicy()
No delete.
-
getIndicesToDelete
protected java.util.List<java.lang.Integer> getIndicesToDelete(java.util.List<Index> indices)
Get a list of indices to delete (if any)
-
runPolicy
public void runPolicy(java.util.List<Index> indices)
-
deleteIndex
public void deleteIndex(IndexOnDisk index)
-
-