Ejemplo n.º 1
0
 /// <summary>Used for testing </summary>
 private void  AddMyself()
 {
     lock (allInstances.SyncRoot)
     {
         int size = allInstances.Count;
         int upto = 0;
         for (int i = 0; i < size; i++)
         {
             ConcurrentMergeScheduler other = (ConcurrentMergeScheduler)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;
             }
         }
         ((System.Collections.IList)((System.Collections.ArrayList)allInstances).GetRange(upto, allInstances.Count - upto)).Clear();
         allInstances.Add(this);
     }
 }
Ejemplo n.º 2
0
 public MergeThread(ConcurrentMergeScheduler enclosingInstance, IndexWriter writer, MergePolicy.OneMerge startMerge)
 {
     InitBlock(enclosingInstance);
     this.writer     = writer;
     this.startMerge = startMerge;
 }
Ejemplo n.º 3
0
			public MergeThread(ConcurrentMergeScheduler enclosingInstance, IndexWriter writer, MergePolicy.OneMerge startMerge)
			{
				InitBlock(enclosingInstance);
				this.writer = writer;
				this.startMerge = startMerge;
			}
Ejemplo n.º 4
0
 private void  InitBlock(ConcurrentMergeScheduler enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
 }
Ejemplo n.º 5
0
			private void  InitBlock(ConcurrentMergeScheduler enclosingInstance)
			{
				this.enclosingInstance = enclosingInstance;
			}