Example #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);
        }
Example #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));
 }
Example #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);
 }
Example #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;
 }