public IKeyValueDBTransaction StartTransaction() { var result = new KeyValueDBReplayTransactionProxy(_db.StartTransaction(), _log, ref _trCounter); lock (_log) { _log.WriteUInt8((byte)KVReplayOperation.StartTransaction); _log.WriteVUInt32(result.TrIndex); _log.FlushBuffer(); } return(result); }
public Task <IKeyValueDBTransaction> StartWritingTransaction() { return(_db.StartWritingTransaction().ContinueWith <IKeyValueDBTransaction>(t => { var result = new KeyValueDBReplayTransactionProxy(t.Result, _log, ref _trCounter); lock (_log) { _log.WriteUInt8((byte)KVReplayOperation.StartWritingTransaction); _log.WriteVUInt32(result.TrIndex); _log.FlushBuffer(); } return result; }, TaskContinuationOptions.ExecuteSynchronously)); }
public Task<IKeyValueDBTransaction> StartWritingTransaction() { return _db.StartWritingTransaction().ContinueWith<IKeyValueDBTransaction>(t => { var result = new KeyValueDBReplayTransactionProxy(t.Result, _log, ref _trCounter); lock (_log) { _log.WriteUInt8((byte)KVReplayOperation.StartWritingTransaction); _log.WriteVUInt32(result.TrIndex); _log.FlushBuffer(); } return result; }, TaskContinuationOptions.ExecuteSynchronously); }
public IKeyValueDBTransaction StartTransaction() { var result = new KeyValueDBReplayTransactionProxy(_db.StartTransaction(), _log, ref _trCounter); lock (_log) { _log.WriteUInt8((byte)KVReplayOperation.StartTransaction); _log.WriteVUInt32(result.TrIndex); _log.FlushBuffer(); } return result; }