CommitWrittingTransaction() private method

private CommitWrittingTransaction ( IBTreeRootNode btreeRoot ) : void
btreeRoot IBTreeRootNode
return void
Ejemplo n.º 1
0
        public void Commit()
        {
            if (BtreeRoot == null)
            {
                throw new BTDBException("Transaction already commited or disposed");
            }
            InvalidateCurrentKey();
            var currentBtreeRoot = _btreeRoot;

            _btreeRoot = null;
            if (_preapprovedWritting)
            {
                _preapprovedWritting = false;
                _keyValueDB.RevertWrittingTransaction();
            }
            else if (_writting)
            {
                _keyValueDB.CommitWrittingTransaction(currentBtreeRoot);
                _writting = false;
            }
        }