Table of Contents

Class RecoveryLeaderElector

Namespace
Virtufin.WorkManager.Services
Assembly
Virtufin.WorkManager.dll
public sealed class RecoveryLeaderElector : IRecoveryLeaderElector
Inheritance
RecoveryLeaderElector
Implements
Inherited Members

Constructors

RecoveryLeaderElector(StateClient, string, ILogger<RecoveryLeaderElector>, WorkerRecoveryOptions)

public RecoveryLeaderElector(State.StateClient stateClient, string instanceId, ILogger<RecoveryLeaderElector> logger, WorkerRecoveryOptions options)

Parameters

stateClient State.StateClient
instanceId string
logger ILogger<RecoveryLeaderElector>
options WorkerRecoveryOptions

Fields

LeaseKey

public const string LeaseKey = "workmanager.recovery.leader"

Field Value

string

Methods

ReleaseLeaseAsync()

public Task ReleaseLeaseAsync()

Returns

Task

TryAcquireLeaseAsync(CancellationToken)

public Task<bool> TryAcquireLeaseAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task<bool>