public override void TransactionStarted()
        {
            _startedTransactionCount.increment();
            long active = _activeReadTransactionCount.incrementAndGet();

            _peakTransactionCount = Math.Max(_peakTransactionCount, active);
        }
示例#2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void merge(IndexWriter writer, MergeTrigger trigger, boolean newMergesFound) throws java.io.IOException
        public override void Merge(IndexWriter writer, MergeTrigger trigger, bool newMergesFound)
        {
            while (true)
            {
                MergePolicy.OneMerge merge = writer.NextMerge;
                if (merge == null)
                {
                    return;
                }
                bool success = false;
                try
                {
                    MergeThread mergeThread = getMergeThread(writer, merge);
                    _writerTaskCounter.increment();
                    PooledConcurrentMergePool.MergeThreadsPool.submit(MergeTask(mergeThread));
                    success = true;
                }
                finally
                {
                    if (!success)
                    {
                        writer.mergeFinish(merge);
                        _writerTaskCounter.decrement();
                    }
                }
            }
        }
 private static void IncrementCounter(LongAdder readCount, LongAdder writeCount, bool write)
 {
     if (write)
     {
         writeCount.increment();
     }
     else
     {
         readCount.increment();
     }
 }
 public override void UpgradeToWriteTransaction()
 {
     _activeReadTransactionCount.decrementAndGet();
     _activeWriteTransactionCount.increment();
 }
示例#5
0
 public override void TxPullRequest(long txId)
 {
     _events.increment();
     this._lastRequestedTxId.set(txId);
 }
示例#6
0
 public override void UnmappedFile(File file)
 {
     FilesUnmappedConflict.increment();
 }