MakeWrittableTransaction() private method

private MakeWrittableTransaction ( BTDB.KVDBLayer.InMemoryKeyValueDBTransaction keyValueDBTransaction, IBTreeRootNode btreeRoot ) : IBTreeRootNode
keyValueDBTransaction BTDB.KVDBLayer.InMemoryKeyValueDBTransaction
btreeRoot IBTreeRootNode
return IBTreeRootNode
示例#1
0
        void MakeWrittable()
        {
            if (_writting)
            {
                return;
            }
            if (_preapprovedWritting)
            {
                _writting            = true;
                _preapprovedWritting = false;
                return;
            }
            if (_readOnly)
            {
                throw new BTDBTransactionRetryException("Cannot write from readOnly transaction");
            }
            var oldBTreeRoot = BtreeRoot;

            _btreeRoot = _keyValueDB.MakeWrittableTransaction(this, oldBTreeRoot);
            _writting  = true;
            InvalidateCurrentKey();
        }