Table of Contents

Method Create

Namespace
MailFathom.Application.Jobs.Execution
Assembly
MailFathom.Application.dll

Create(int, TimeSpan, TimeSpan, int, TimeSpan, TimeSpan)

States the bounds one pass runs under.

public static JobExecutionSettings Create(int batchSize, TimeSpan leaseDuration, TimeSpan executionTimeout, int maxAttempts, TimeSpan retryBaseDelay, TimeSpan retryMaxDelay)

Parameters

batchSize int

The greatest number of jobs one pass takes.

leaseDuration TimeSpan

How long a claim holds each job it takes.

executionTimeout TimeSpan

How long one job may run before it is cancelled.

maxAttempts int

How many attempts one job may be handed out for.

retryBaseDelay TimeSpan

The delay the first retry is drawn around.

retryMaxDelay TimeSpan

The ceiling a grown retry delay never exceeds.

Returns

JobExecutionSettings

The validated bounds.

Exceptions

ArgumentOutOfRangeException

Thrown when batchSize or maxAttempts is not positive, when a duration is not positive, when executionTimeout is not shorter than leaseDuration, or when retryMaxDelay is below retryBaseDelay.