Table of Contents

Method Create

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

Create(IReadOnlyList<JobType>, int, TimeSpan, JobLeaseOwner)

States what this process can run and how long it would hold it for.

public static JobClaimRequest Create(IReadOnlyList<JobType> handledTypes, int batchSize, TimeSpan leaseDuration, JobLeaseOwner user)

Parameters

handledTypes IReadOnlyList<JobType>

The job types this process has a handler for.

batchSize int

The greatest number of jobs to take.

leaseDuration TimeSpan

How long each claimed job is held.

user JobLeaseOwner

The attempt the claimed jobs are stamped with.

Returns

JobClaimRequest

The validated claim.

Exceptions

ArgumentNullException

Thrown when handledTypes or user is null.

ArgumentException

Thrown when handledTypes is empty, repeats a type, or holds the unspecified default.

ArgumentOutOfRangeException

Thrown when batchSize is not positive or leaseDuration is not positive.