MakeWrittableTransaction() private method

private MakeWrittableTransaction ( BTDB.KVDBLayer.InMemoryKeyValueDBTransaction keyValueDBTransaction, IBTreeRootNode btreeRoot ) : IBTreeRootNode
keyValueDBTransaction BTDB.KVDBLayer.InMemoryKeyValueDBTransaction
btreeRoot IBTreeRootNode
return IBTreeRootNode
Ejemplo n.º 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();
        }