Beispiel #1
0
 /// <summary>Used for testing </summary>
 private void  AddMyself()
 {
     lock (allInstances)
     {
         int size = allInstances.Count;
         int upto = 0;
         for (int i = 0; i < size; i++)
         {
             ConcurrentMergeScheduler other = allInstances[i];
             if (!(other.closed && 0 == other.MergeThreadCount()))
             {
                 // Keep this one for now: it still has threads or
                 // may spawn new threads
                 allInstances[upto++] = other;
             }
         }
         allInstances.RemoveRange(upto, allInstances.Count - upto);
         allInstances.Add(this);
     }
 }
Beispiel #2
0
 public MergeThread(ConcurrentMergeScheduler enclosingInstance, IndexWriter writer, MergePolicy.OneMerge startMerge)
 {
     InitBlock(enclosingInstance);
     this.writer     = writer;
     this.startMerge = startMerge;
 }
			public MergeThread(ConcurrentMergeScheduler enclosingInstance, IndexWriter writer, MergePolicy.OneMerge startMerge)
			{
				InitBlock(enclosingInstance);
				this.writer = writer;
				this.startMerge = startMerge;
			}
Beispiel #4
0
 private void  InitBlock(ConcurrentMergeScheduler enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
 }
			private void  InitBlock(ConcurrentMergeScheduler enclosingInstance)
			{
				this.enclosingInstance = enclosingInstance;
			}