Table of Contents

Struct TriggerAcquireResult

Namespace
Quartz.Impl.AdoJobStore
Assembly
Quartz.dll
public readonly record struct TriggerAcquireResult : IEquatable<TriggerAcquireResult>
Implements
Inherited Members

Remarks

Deliberately not the trigger itself: acquisition looks at many more rows than it takes, so the candidate carries only what deciding costs — the key to reserve, the job type to load, and the execution group to count against its limit.

Constructors

TriggerAcquireResult(TriggerKey, string, string?)

public TriggerAcquireResult(TriggerKey TriggerKey, string JobTypeName, string? ExecutionGroup)

Parameters

TriggerKey TriggerKey

The key of the trigger that could be fired.

JobTypeName string

The name of the job's type, as the trigger's job row stores it — the same thing JobTypeName carries, and what the type loader is handed to load the job. Not to be confused with TriggerType, which is a store discriminator rather than a type name.

ExecutionGroup string

The trigger's execution group, if it has one.

Remarks

Deliberately not the trigger itself: acquisition looks at many more rows than it takes, so the candidate carries only what deciding costs — the key to reserve, the job type to load, and the execution group to count against its limit.

Properties

ConcurrentExecutionDisallowed

Whether the trigger's job disallows concurrent execution, as its stored row says, or null when the delegate did not read it.

public bool? ConcurrentExecutionDisallowed { get; init; }

Property Value

bool?

Remarks

Acquisition takes at most one trigger per such job into a batch. The stored flag is the answer to ask, because it is what the fire path obeys: it records the job's ConcurrentExecutionDisallowed, which a job configured with DisallowConcurrentExecution() says without any attribute on its type.

Every dialect Quartz ships reads it. It is null from a delegate of your own that does not set it, and from a StdAdoDelegate subclass whose overridden acquisition statement does not project IS_NONCONCURRENT, as one written for 4.2 does not. Either is answered from the job type's DisallowConcurrentExecutionAttribute, which is what acquisition asked before this property existed.

ExecutionGroup

The trigger's execution group, if it has one.

public string? ExecutionGroup { get; init; }

Property Value

string

ExecutionGroupAtLimit

Whether the row was read and then refused because its execution group had no slot left in the ExecutionLimits it was read under.

public bool ExecutionGroupAtLimit { get; init; }

Property Value

bool

Remarks

A candidate the delegate refuses for its limit is returned flagged rather than dropped, so that the store can see it. The acquisition statement limits its rows to the count asked for, and a row dropped after that limit is invisible to the store: it cannot tell a read that came back short because nothing else is due from one that came back short because the rows it did not see were refused. A node reading one trigger at a time then read the same refused row every round and never reached the due rows behind it (#3928). A flagged row is counted as skipped, is never read back or reserved, and is what the store reads past.

Every dialect Quartz ships sets it. A delegate of your own that drops the refused rows instead keeps working as it did, and a StdAdoDelegate subclass that inspects what its base returns now sees the refused rows among them, flagged.

JobTypeName

The name of the job's type, as the trigger's job row stores it — the same thing JobTypeName carries, and what the type loader is handed to load the job. Not to be confused with TriggerType, which is a store discriminator rather than a type name.

public string JobTypeName { get; init; }

Property Value

string

MeasureIntervalFromCompletion

Whether the trigger measures its interval from the previous run's completion, as its row's FIXED_DELAY says (#4140).

public bool MeasureIntervalFromCompletion { get; init; }

Property Value

bool

Remarks

Such a trigger is held while it runs, as a BufferOne one is, and its fire stores it held against the paused groups, which only the lock keeps still, so a candidate that says so makes the round take it. Every dialect Quartz ships reads it. A delegate that does not answers false, and a round that claims such a trigger without the lock rolls back at the fire and runs again under it.

NextFireTimeUtc

The trigger's next fire time, as its row holds it, or null when the delegate did not read it.

public DateTimeOffset? NextFireTimeUtc { get; init; }

Property Value

DateTimeOffset?

Remarks

A round that takes no TRIGGER_ACCESS lock (#4067) claims each candidate by this value before it reads the row in full, so that what it fires is the row as it stands once the claim holds it. Every dialect Quartz ships reads it; a delegate that does not makes the round take the lock, as a row the round cannot claim from its first read is a row it has to read before claiming.

OverlapPolicy

The trigger's overlap policy, as its row holds it, or null when the delegate did not read it.

public OverlapPolicy? OverlapPolicy { get; init; }

Property Value

OverlapPolicy?

Remarks

Skip, BufferOne and CancelPrevious are decided at the fire from the trigger's running firings, which only the lock keeps still, so a candidate with one of them makes the round take it (#4067). Every dialect Quartz ships reads it; null is read as "lock", since nothing is known.

TriggerKey

The key of the trigger that could be fired.

public TriggerKey TriggerKey { get; init; }

Property Value

TriggerKey