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