Package org.apache.lucene.index
Class MergeState.CheckAbort
- java.lang.Object
-
- org.apache.lucene.index.MergeState.CheckAbort
-
- Enclosing class:
- MergeState
public static class MergeState.CheckAbort extends java.lang.Object
Class for recording units of work when merging segments.
-
-
Constructor Summary
Constructors Constructor Description CheckAbort(MergePolicy.OneMerge merge, Directory dir)
Creates a #CheckAbort instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
work(double units)
Records the fact that roughly units amount of work have been done since this method was last called.
-
-
-
Constructor Detail
-
CheckAbort
public CheckAbort(MergePolicy.OneMerge merge, Directory dir)
Creates a #CheckAbort instance.
-
-
Method Detail
-
work
public void work(double units) throws MergePolicy.MergeAbortedException
Records the fact that roughly units amount of work have been done since this method was last called. When adding time-consuming code into SegmentMerger, you should test different values for units to ensure that the time in between calls to merge.checkAborted is up to ~ 1 second.
-
-