internal override void Visit(RemoveTxRequest req)
        {
            TxTableEntry te = null;

            this.txTable.TryRemove(req.TxId, out te);
            if (te != null)
            {
                req.Result = true;
            }
            else
            {
                req.Result = false;
            }
            req.Finished = true;
        }
Ejemplo n.º 2
0
        internal override void Visit(RemoveTxRequest req)
        {
            this.HashId = req.TxId.ToString();
            byte[][] keysBytes =
            {
                Encoding.ASCII.GetBytes(TxTableEntry.STATUS_STRING),
                Encoding.ASCII.GetBytes(TxTableEntry.COMMIT_TIME_STRING),
                Encoding.ASCII.GetBytes(TxTableEntry.COMMIT_LOWER_BOUND_STRING)
            };

            this.RedisReq = new RedisRequest(this.HashId, keysBytes, RedisRequestType.HDel)
            {
                ParentRequest = req
            };
        }
Ejemplo n.º 3
0
        internal override void Visit(RemoveTxRequest req)
        {
            string hashId = req.TxId.ToString();

            if (this.redisVersionDbMode == RedisVersionDbMode.Cluster)
            {
                hashId = RedisVersionDb.PACK_KEY(RedisVersionDb.TX_KEY_PREFIX, hashId);
            }

            byte[][] keysBytes =
            {
                Encoding.ASCII.GetBytes(TxTableEntry.TXID_STRING),
                Encoding.ASCII.GetBytes(TxTableEntry.STATUS_STRING),
                Encoding.ASCII.GetBytes(TxTableEntry.COMMIT_TIME_STRING),
                Encoding.ASCII.GetBytes(TxTableEntry.COMMIT_LOWER_BOUND_STRING)
            };

            RedisRequest redisReq = this.NextRedisRequest();

            redisReq.Set(hashId, keysBytes, RedisRequestType.HDel);
            redisReq.ParentRequest = req;
        }
Ejemplo n.º 4
0
 internal override void Visit(RemoveTxRequest req)
 {
     byte[] returnBytes = req.Result as byte[];
     req.Result = returnBytes == null ? false : BitConverter.ToInt64(returnBytes, 0) == 1L;
 }
Ejemplo n.º 5
0
 internal virtual void Visit(RemoveTxRequest req)
 {
 }
Ejemplo n.º 6
0
 internal override void Visit(RemoveTxRequest req)
 {
     this.txTable.Remove(req.TxId);
     req.Result   = true;
     req.Finished = true;
 }