Class ReactorPartitionRecoveryExtensions

Namespace
Cratis.Chronicle.Reactors
Assembly
Cratis.Chronicle.dll

Adds typed failed-partition recovery without changing the existing IReactors contract.

public static class ReactorPartitionRecoveryExtensions
Inheritance
ReactorPartitionRecoveryExtensions
Inherited Members

Methods

ClearFailedPartitionQuarantineFor<TReactor>(IReactors, Partition, bool)

Clear the quarantine of a failed partition for a registered reactor and reset its retry budget.

public static Task<ReactorPartitionQuarantineClearResult> ClearFailedPartitionQuarantineFor<TReactor>(this IReactors reactors, Partition partition, bool retryImmediately = true) where TReactor : IReactor

Parameters

reactors IReactors

The reactor registry.

partition Partition

The quarantined partition.

retryImmediately bool

Whether to start recovering the partition right away.

Returns

Task<ReactorPartitionQuarantineClearResult>

The bounded outcome of the request.

Type Parameters

TReactor

The reactor type.

Exceptions

ReactorPartitionRecoveryNotSupported

The reactor registry does not support partition recovery.

RetryFailedPartitionFor<TReactor>(IReactors, Partition)

Retry a failed partition for a registered reactor.

public static Task<ReactorPartitionRetryOutcome> RetryFailedPartitionFor<TReactor>(this IReactors reactors, Partition partition) where TReactor : IReactor

Parameters

reactors IReactors

The reactor registry.

partition Partition

The failed partition.

Returns

Task<ReactorPartitionRetryOutcome>

The bounded outcome of the retry request.

Type Parameters

TReactor

The reactor type.

Exceptions

ReactorPartitionRecoveryNotSupported

The reactor registry does not support partition recovery.