Table of Contents

Class TriggerAcquisitionCriteria

Namespace
Quartz.Impl.AdoJobStore
Assembly
Quartz.dll
public sealed record TriggerAcquisitionCriteria : IEquatable<TriggerAcquisitionCriteria>
Inheritance
TriggerAcquisitionCriteria
Implements
Inherited Members

Remarks

This is the extension point for acquisition filtering (see issue #2238). Every future way of narrowing what a node will pick up — additional trigger predicates, per-node partitioning, more capacity dimensions than the execution groups already here — belongs on this record as another optional property, so that adding one is additive and does not change the delegate's signature or break dialect delegates that override it.

Consequently a property added later must default to "no additional filtering", so that an implementation which ignores it keeps behaving as it did.

Properties

ClusterInFlight

What the whole cluster already holds in flight per (execution group, trigger group) pair, which is what a Cluster limit is counted against.

public IReadOnlyCollection<ExecutionGroupInFlight>? ClusterInFlight { get; init; }

Property Value

IReadOnlyCollection<ExecutionGroupInFlight>

Remarks

The ADO store fills this from SelectExecutionGroupsInFlight(ConnectionAndTransactionHolder, CancellationToken) once per acquisition attempt, and only when HasClusterScopedLimits says a cluster-scoped limit exists — so a configuration that uses none pays nothing. A store that set the value itself is left alone, which is how one keeping the count somewhere other than the fired-triggers table says so.

null means "not counted", not "nothing in flight": a delegate handed null enforces the configured numbers as written, which is correct when no limit is cluster-scoped and would be wrong if it were treated as an empty cluster.

ExcludedJobTypeNames

Job type names to exclude from acquisition, copied from ExcludedJobTypeNames — or set by a derived store's CreateAcquisitionCriteria, which is how a deployment says what this node will not pick up.

public IReadOnlyCollection<string>? ExcludedJobTypeNames { get; init; }

Property Value

IReadOnlyCollection<string>

Remarks

StdAdoDelegate keeps the rows out in the acquisition SQL, where comparison follows the job-class column's collation. A delegate is free to ignore the property, as it is with every other one here — the ADO store drops the excluded candidates ordinally as they come back, before it reads any of them, so an uncooperative delegate degrades to a wider result set rather than to running work the deployment excluded. A delegate that answers FiltersAcquisitionJobTypeExclusions with true is taken at its word and that pass is skipped.

Entries must be non-blank, and there may be at most 1,000 of them — Oracle's ceiling on an IN list. Blank is rejected rather than skipped because one would make the clause NOT IN (…, NULL), which matches no row at all and would stop the node acquiring anything.

Exceptions

ArgumentException

An entry is blank, or there are too many of them.

ExecutionLimits

Available slots per execution group, or null when no execution limits are configured. The snapshot is immutable; a delegate that counts slots down as it takes rows works on ToWorkingCopy(), because the caller may reuse this instance across retries.

public ExecutionLimits? ExecutionLimits { get; init; }

Property Value

ExecutionLimits

LiveNodeCutoff

Instant before which a node's last check-in is considered stale, releasing its pinned triggers to other nodes (preferred node / node affinity).

public required DateTimeOffset LiveNodeCutoff { get; init; }

Property Value

DateTimeOffset

MaxCount

Maximum number of triggers to return.

public required int MaxCount { get; init; }

Property Value

int

NoEarlierThan

Lowest value of NextFireTimeUtc of the triggers to acquire, which is what keeps a misfired trigger out of the acquisition path. Only applies to triggers that have a misfire instruction.

public required DateTimeOffset NoEarlierThan { get; init; }

Property Value

DateTimeOffset

NoLaterThan

Highest value of NextFireTimeUtc of the triggers to acquire.

public required DateTimeOffset NoLaterThan { get; init; }

Property Value

DateTimeOffset