Пример #1
0
        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);
        }
Пример #2
0
 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));
 }
Пример #3
0
 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);
 }
Пример #4
0
 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;
 }