Пример #1
0
 public RedisLock(string redisConfigName = null)
 {
     this.redisWrapper = RedisFactory.GetRedisWrapper(redisConfigName);
 }
Пример #2
0
 public Redlock(string resource, TimeSpan timeOut)
 {
     this.redisLock = RedisFactory.GetRedisLock();
     this.lockInfo  = GetLockInfo(resource, timeOut);
     ExecHelper.RetryUntilTrue(() => { return(redisLock.Lock(lockInfo)); }, timeOut);
 }