Table of Contents

Class OccurrenceSpamClassificationHandler

Namespace
MailFathom.Application.Spam
Assembly
MailFathom.Application.dll

Runs a classification that names a remote occurrence, by resolving it to the stored email it names.

public sealed class OccurrenceSpamClassificationHandler : IJobHandler
Inheritance
OccurrenceSpamClassificationHandler
Implements
Inherited Members

Remarks

Nothing this build enqueues reaches it: arriving mail is asked for under ClassifyStoredEmailSpam. It is here because a rolling upgrade runs two builds against one queue, and a replica of the previous build goes on enqueuing ClassifyEmailSpam until it is replaced. A type nothing handled would leave those rows waiting for a replica that no longer exists, and a new document shape under the old name would stop every batch an older replica claimed.

The occurrence is resolved under the payload's user, so an occurrence that names another user's mail resolves to nothing. A stored email no server holds any longer has no occurrence to be found at, and ends the job as done for the reason a message expunged before the job ran always has. Whatever it resolves to is handed to the classification of a stored email, so both types run one use case.

Constructors

OccurrenceSpamClassificationHandler(IClassifiableEmailReader, EmailSpamClassificationHandler)

Initializes the handler over the resolution and the classification it hands the result to.

Properties

JobType

Gets the job type this handler runs, which is also the contract its payload arrives under.

Methods

RunAsync(IJobPayload, CancellationToken)

Runs the work the payload describes.