예제 #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);
 }