## 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 Object

Class for recording units of work when merging segments.

Constructor Summary
`MergeState.CheckAbort(MergePolicy.OneMerge merge, Directory dir)` Creates a #CheckAbort instance.

Method Summary
`void` `work(double units)` Records the fact that roughly units amount of work have been done since this method was last called.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MergeState.CheckAbort

    public MergeState.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.

  Throws:
    `MergePolicy.MergeAbortedException`

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.