public RedisLock(string redisConfigName = null) { this.redisWrapper = RedisFactory.GetRedisWrapper(redisConfigName); }
public Redlock(string resource, TimeSpan timeOut) { this.redisLock = RedisFactory.GetRedisLock(); this.lockInfo = GetLockInfo(resource, timeOut); ExecHelper.RetryUntilTrue(() => { return(redisLock.Lock(lockInfo)); }, timeOut); }