IDistributedLockAsync
Distributed lock interface
Assembly: ServiceStack.Redis.dll
View Source
Declaration
public interface IDistributedLockAsync
Methods
LockAsync(String, Int32, Int32, IRedisClientAsync, CancellationToken)
View Source
Declaration
ValueTask<LockState> LockAsync(string key, int acquisitionTimeout, int lockTimeout, IRedisClientAsync client, CancellationToken token = default(CancellationToken))
Returns
ValueTask<ServiceStack.Redis.Support.Locking.LockState>
Parameters
Type | Name |
---|---|
System.String | key |
System.Int32 | acquisitionTimeout |
System.Int32 | lockTimeout |
ServiceStack.Redis.IRedisClientAsync | client |
System.Threading.CancellationToken | token |
UnlockAsync(String, Int64, IRedisClientAsync, CancellationToken)
View Source
Declaration
ValueTask<bool> UnlockAsync(string key, long lockExpire, IRedisClientAsync client, CancellationToken token = default(CancellationToken))
Returns
ValueTask<System.Boolean>
Parameters
Type | Name |
---|---|
System.String | key |
System.Int64 | lockExpire |
ServiceStack.Redis.IRedisClientAsync | client |
System.Threading.CancellationToken | token |