コード例 #1
0
ファイル: DocumentsWriter.cs プロジェクト: saturn-chan/YAFNET
 // TODO: we could check w/ FreqProxTermsWriter: if the
 // term doesn't exist, don't bother buffering into the
 // per-DWPT map (but still must go into the global map)
 internal bool DeleteTerms(params Term[] terms)
 {
     lock (this)
     {
         // TODO why is this synchronized?
         DocumentsWriterDeleteQueue deleteQueue = this.deleteQueue;
         deleteQueue.AddDelete(terms);
         flushControl.DoOnDelete();
         return(ApplyAllDeletes(deleteQueue));
     }
 }
コード例 #2
0
 // TODO: we could check w/ FreqProxTermsWriter: if the
 // term doesn't exist, don't bother buffering into the
 // per-DWPT map (but still must go into the global map)
 internal bool DeleteTerms(params Term[] terms)
 {
     UninterruptableMonitor.Enter(this);
     try
     {
         // TODO why is this synchronized?
         DocumentsWriterDeleteQueue deleteQueue = this.deleteQueue;
         deleteQueue.AddDelete(terms);
         flushControl.DoOnDelete();
         return(ApplyAllDeletes(deleteQueue));
     }
     finally
     {
         UninterruptableMonitor.Exit(this);
     }
 }