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