Table of Contents

Class DerivedWorkGate

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

Decides whether the work derived from a message may run yet, from where the message is and what was decided about it.

public sealed class DerivedWorkGate
Inheritance
DerivedWorkGate
Inherited Members

Remarks

Nothing expensive happens to a message before it is known not to be junk, and nothing expensive happens to it at all if it is. That is the whole of the mechanism: chunking, embedding, and rule evaluation are ordered behind classification rather than compensated for afterwards, so a message on its way to the junk folder is never chunked, never embedded, and never offered to a rule — the work was not cancelled, it was never started.

The one failure mode it must not have is turning a wedged scanner into a silently dead index. A message that cannot be classified, and one that has waited longer than a verdict is allowed to take, are both released to derived work and counted as released; only a message genuinely still waiting is held, and only for as long as the wait permits.

It reads and never writes. No flag records that a message was withheld, which is what makes mail the owner drags out of the junk folder ordinary mail from that moment: the next reading of the same four facts admits it, and the ordinary backfill picks it up.

Constructors

DerivedWorkGate(ISpamClassificationSettingsReader, IJunkMailFolderCatalog, TimeProvider)

Initializes the gate from the decisions it obeys.

Methods

Admit(DerivedWorkAdmissionTerms, DerivedWorkCandidate)

Decides what one occurrence's admission is under terms already read.

Admit(DerivedWorkCandidate)

Decides what classification says about one occurrence right now.

ReadTerms()

Reads the terms in force now, as one snapshot a whole walk is decided under.