C# Class DistributedMutex.BlobDistributedMutex

Mostra file Open project: mspnp/cloud-design-patterns Class Usage Examples

Public Methods

Method Description
BlobDistributedMutex ( BlobSettings blobSettings, Task>.Func taskToRunWhenLeaseAquired ) : System
RunTaskWhenMutexAcquired ( CancellationToken token ) : Task

Private Methods

Method Description
CancelAllWhenAnyCompletes ( Task leaderTask, Task renewLeaseTask, CancellationTokenSource cts ) : Task
KeepRenewingLease ( BlobLeaseManager leaseManager, string leaseId, CancellationToken token ) : Task
RunTaskWhenBlobLeaseAcquired ( BlobLeaseManager leaseManager, CancellationToken token ) : Task
TryAcquireLeaseOrWait ( BlobLeaseManager leaseManager, CancellationToken token ) : Task

Method Details

BlobDistributedMutex() public method

public BlobDistributedMutex ( BlobSettings blobSettings, Task>.Func taskToRunWhenLeaseAquired ) : System
blobSettings BlobSettings
taskToRunWhenLeaseAquired Task>.Func
return System

RunTaskWhenMutexAcquired() public method

public RunTaskWhenMutexAcquired ( CancellationToken token ) : Task
token System.Threading.CancellationToken
return Task