CheckAborted() public méthode

Called periodically by IndexWriter while merging to see if the merge is aborted.
public CheckAborted ( Directory dir ) : void
dir Directory
Résultat void
Exemple #1
0
 /// <summary> 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.
 /// </summary>
 public virtual void  Work(double units)
 {
     workCount += units;
     if (workCount >= 10000.0)
     {
         merge.CheckAborted(dir);
         workCount = 0;
     }
 }
Exemple #2
0
 /// <summary> 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.
 /// </summary>
 /// DIGY: Clean AnonymousXXXX classes.
 /// DIGY: Method "Work" is renamed to Internal_Work(below) & the new "Work" is declared as delegate
 void  Internal_Work(double units)
 {
     workCount += units;
     if (workCount >= 10000.0)
     {
         merge.CheckAborted(dir);
         workCount = 0;
     }
 }