public IRedLock CreateLock(string resource, TimeSpan expiryTime) { return(RedLock.Create( redisCaches, resource, expiryTime)); }
public async Task <IRedLock> CreateLockAsync(string resource, TimeSpan expiryTime) { return(await RedLock.CreateAsync( redisCaches, resource, expiryTime).ConfigureAwait(false)); }
public IRedLock CreateLock(string resource, TimeSpan expiryTime) { return(RedLock.Create( this.loggerFactory.CreateLogger <RedLock>(), redisCaches, resource, expiryTime)); }
public async Task <IRedLock> CreateLockAsync(string resource, TimeSpan expiryTime) { return(await RedLock.CreateAsync( this.loggerFactory.CreateLogger <RedLock>(), redisCaches, resource, expiryTime, retryConfiguration : configuration.RetryConfiguration).ConfigureAwait(false)); }
public async Task <IRedLock> CreateLockAsync(string resource, TimeSpan expiryTime, TimeSpan waitTime, TimeSpan retryTime, CancellationToken?cancellationToken = null) { return(await RedLock.CreateAsync( redisCaches, resource, expiryTime, waitTime, retryTime, cancellationToken ?? CancellationToken.None).ConfigureAwait(false)); }
public IRedLock CreateLock(string resource, TimeSpan expiryTime, TimeSpan waitTime, TimeSpan retryTime, CancellationToken?cancellationToken = null) { return(RedLock.Create( redisCaches, resource, expiryTime, waitTime, retryTime, cancellationToken ?? CancellationToken.None)); }
public IRedLock CreateLock(string resource, TimeSpan expiryTime, TimeSpan waitTime, TimeSpan retryTime, CancellationToken?cancellationToken = null) { return(RedLock.Create( this.loggerFactory.CreateLogger <RedLock>(), redisCaches, resource, expiryTime, waitTime, retryTime, configuration.RetryConfiguration, cancellationToken ?? CancellationToken.None)); }
internal static RedLock Create( ICollection <RedisConnection> redisCaches, string resource, TimeSpan expiryTime, TimeSpan?waitTime = null, TimeSpan?retryTime = null, CancellationToken?cancellationToken = null) { var redisLock = new RedLock( redisCaches, resource, expiryTime, waitTime, retryTime, cancellationToken); redisLock.Start(); return(redisLock); }
internal static async Task <RedLock> CreateAsync( ICollection <RedisConnection> redisCaches, string resource, TimeSpan expiryTime, TimeSpan?waitTime = null, TimeSpan?retryTime = null, CancellationToken?cancellationToken = null) { var redisLock = new RedLock( redisCaches, resource, expiryTime, waitTime, retryTime, cancellationToken); await redisLock.StartAsync().ConfigureAwait(false); return(redisLock); }