Skip to main content

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
TypeName
System.Stringkey
System.Int32acquisitionTimeout
System.Int32lockTimeout
ServiceStack.Redis.IRedisClientAsyncclient
System.Threading.CancellationTokentoken

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
TypeName
System.Stringkey
System.Int64lockExpire
ServiceStack.Redis.IRedisClientAsyncclient
System.Threading.CancellationTokentoken