public void Dispose() { redisHash = null; redisKey = null; redisList = null; redisLock = null; redisSet = null; redisSortedSet = null; redisStore = null; redisString = null; redisSubscribe = null; }
private void Init() { Instance = new RedisLockManager("Default"); }
public Redlock(string resource, TimeSpan timeOut) { this.redisLock = RedisFactory.GetRedisLock(); this.lockInfo = GetLockInfo(resource, timeOut); ExecHelper.RetryUntilTrue(() => { return(redisLock.Lock(lockInfo)); }, timeOut); }