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; }
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 }; }
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; }
internal override void Visit(RemoveTxRequest req) { byte[] returnBytes = req.Result as byte[]; req.Result = returnBytes == null ? false : BitConverter.ToInt64(returnBytes, 0) == 1L; }
internal virtual void Visit(RemoveTxRequest req) { }
internal override void Visit(RemoveTxRequest req) { this.txTable.Remove(req.TxId); req.Result = true; req.Finished = true; }