GetTransactionPages() 개인적인 메소드

private GetTransactionPages ( ) : HashSet
리턴 HashSet
예제 #1
0
        private void TransactionAfterCommit(Transaction tx)
        {
            if (_activeTransactions.Contains(tx) == false)
		        return;
	        
            _txCommit.EnterWriteLock();
            try
            {
                if (tx.Committed && tx.FlushedToJournal)
                    _transactionsCounter = tx.Id;

                State = tx.State;
            }
            finally
            {
                _txCommit.ExitWriteLock();
            }

            if (tx.FlushedToJournal == false)
                return;

			var totalPages = 0;
			// ReSharper disable once LoopCanBeConvertedToQuery
			foreach (var page in tx.GetTransactionPages())
			{
				totalPages += page.NumberOfPages;
			}

			Interlocked.Add(ref _sizeOfUnflushedTransactionsInJournalFile, totalPages);
			_flushWriter.Set();
        }
예제 #2
0
        private void TransactionAfterCommit(Transaction tx)
        {
            if (_activeTransactions.Contains(tx) == false)
		        return;
	        
            _txCommit.EnterWriteLock();
            try
            {
                if (tx.Committed && tx.FlushedToJournal)
                    _transactionsCounter = tx.Id;

                State = tx.State;
            }
            finally
            {
                _txCommit.ExitWriteLock();
            }

            if (tx.FlushedToJournal == false)
                return;

            Interlocked.Add(ref _sizeOfUnflushedTransactionsInJournalFile, tx.GetTransactionPages().Sum(x => x.NumberOfPages));
			_flushWriter.Set();
        }