Table of Contents

Class DistributedLock

Namespace
Silverback.Lock
Assembly
Silverback.Core.dll

The base class for all distributed locks.

public abstract class DistributedLock : IDistributedLock
Inheritance
DistributedLock
Implements
Derived
Inherited Members

Constructors

DistributedLock()

protected DistributedLock()

Methods

AcquireAsync(CancellationToken)

Acquires the lock.

public ValueTask<DistributedLockHandle> AcquireAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

A CancellationToken used to cancel the operation.

Returns

ValueTask<DistributedLockHandle>

A Task representing the asynchronous operation.

AcquireCoreAsync(CancellationToken)

Acquires the lock.

protected abstract ValueTask<DistributedLockHandle> AcquireCoreAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A CancellationToken used to cancel the operation.

Returns

ValueTask<DistributedLockHandle>

A Task representing the asynchronous operation.