public GetCommand(string key, BitSet flagMap, string group, string subGroup, LockAccessType accessType, object lockId, TimeSpan lockTimeout, ulong version, string providerName, int threadId, int methodOverload) { base.name = "GetCommand"; base.key = key; _getCommand = new Alachisoft.NCache.Common.Protobuf.GetCommand(); _getCommand.key = key; _getCommand.group = group; _getCommand.subGroup = subGroup; _getCommand.flag = flagMap.Data; _getCommand.lockInfo = new Alachisoft.NCache.Common.Protobuf.LockInfo(); _getCommand.lockInfo.lockAccessType = (int)accessType; if (lockId != null) { _getCommand.lockInfo.lockId = lockId.ToString(); } _getCommand.lockInfo.lockTimeout = lockTimeout.Ticks; _getCommand.version = version; _getCommand.providerName = providerName; _getCommand.requestId = base.RequestId; _getCommand.threadId = threadId; _methodOverload = methodOverload; }
public GetCommand(string key, BitSet flagMap, LockAccessType accessType, object lockId, TimeSpan lockTimeout) { base.name = "GetCommand"; base.key = key; _getCommand = new Alachisoft.NCache.Common.Protobuf.GetCommand(); _getCommand.key = key; _getCommand.flag = flagMap.Data; _getCommand.lockInfo = new Alachisoft.NCache.Common.Protobuf.LockInfo(); _getCommand.lockInfo.lockAccessType = (int)accessType; if(lockId != null) _getCommand.lockInfo.lockId = lockId.ToString(); _getCommand.lockInfo.lockTimeout = lockTimeout.Ticks; _getCommand.requestId = base.RequestId; }
//PROTOBUF private CommandInfo ParseCommand(Alachisoft.NCache.Common.Protobuf.Command command, ClientManager clientManager) { CommandInfo cmdInfo = new CommandInfo(); Alachisoft.NCache.Common.Protobuf.GetCommand getCommand = command.getCommand; cmdInfo.FlagMap = new BitSet((byte)getCommand.flag); cmdInfo.Key = getCommand.key; cmdInfo.LockAccessType = (LockAccessType)getCommand.lockInfo.lockAccessType; cmdInfo.LockId = getCommand.lockInfo.lockId; cmdInfo.LockTimeout = new TimeSpan(getCommand.lockInfo.lockTimeout); cmdInfo.RequestId = getCommand.requestId.ToString(); return(cmdInfo); }
public GetCommand(string key, BitSet flagMap, LockAccessType accessType, object lockId, TimeSpan lockTimeout) { base.name = "GetCommand"; base.key = key; _getCommand = new Alachisoft.NCache.Common.Protobuf.GetCommand(); _getCommand.key = key; _getCommand.flag = flagMap.Data; _getCommand.lockInfo = new Alachisoft.NCache.Common.Protobuf.LockInfo(); _getCommand.lockInfo.lockAccessType = (int)accessType; if (lockId != null) { _getCommand.lockInfo.lockId = lockId.ToString(); } _getCommand.lockInfo.lockTimeout = lockTimeout.Ticks; _getCommand.requestId = base.RequestId; }
//PROTOBUF private CommandInfo ParseCommand(Alachisoft.NCache.Common.Protobuf.Command command, ClientManager clientManager) { CommandInfo cmdInfo = new CommandInfo(); Alachisoft.NCache.Common.Protobuf.GetCommand getCommand = command.getCommand; cmdInfo.CacheItemVersion = getCommand.version; cmdInfo.FlagMap = new BitSet((byte)getCommand.flag); cmdInfo.Group = getCommand.group.Length == 0 ? null : getCommand.group; cmdInfo.Key = getCommand.key; cmdInfo.LockAccessType = (LockAccessType)getCommand.lockInfo.lockAccessType; cmdInfo.LockId = getCommand.lockInfo.lockId; cmdInfo.LockTimeout = new TimeSpan(getCommand.lockInfo.lockTimeout); cmdInfo.ProviderName = getCommand.providerName.Length == 0 ? null : getCommand.providerName; cmdInfo.RequestId = getCommand.requestId.ToString(); cmdInfo.SubGroup = getCommand.subGroup.Length == 0 ? null : getCommand.subGroup; cmdInfo.ThreadId = getCommand.threadId; return(cmdInfo); }
//PROTOBUF private CommandInfo ParseCommand(Alachisoft.NCache.Common.Protobuf.Command command, ClientManager clientManager) { CommandInfo cmdInfo = new CommandInfo(); Alachisoft.NCache.Common.Protobuf.GetCommand getCommand = command.getCommand; cmdInfo.CacheItemVersion = getCommand.version; BitSet bitset = _bitSet; bitset.Data = ((byte)getCommand.flag); cmdInfo.FlagMap = bitset; cmdInfo.Key = clientManager.CacheTransactionalPool.StringPool.GetString(getCommand.key); cmdInfo.LockAccessType = (LockAccessType)getCommand.lockInfo.lockAccessType; cmdInfo.LockId = getCommand.lockInfo.lockId; cmdInfo.LockTimeout = new TimeSpan(getCommand.lockInfo.lockTimeout); cmdInfo.ProviderName = getCommand.providerName.Length == 0 ? null : getCommand.providerName; cmdInfo.RequestId = getCommand.requestId; cmdInfo.ThreadId = getCommand.threadId; return(cmdInfo); }