Table of Contents

Class TriggerAcquisitionRequest

Namespace
Quartz.Extensibility
Assembly
Quartz.dll

What the scheduler asks an IJobStore for when it acquires the next triggers to fire.

public sealed record TriggerAcquisitionRequest : IEquatable<TriggerAcquisitionRequest>
Inheritance
TriggerAcquisitionRequest
Implements
Inherited Members

Remarks

This is the store-level counterpart of the delegate-level Quartz.Impl.AdoJobStore.TriggerAcquisitionCriteria: a store translates a request into whatever criteria its backing storage understands. Keeping it a record means a future acquisition dimension is an added optional property rather than another overload, and a property added later must default to "no additional filtering" so that a store which ignores it keeps behaving as it did.

Properties

ExcludedJobTypeNames

Job type names to exclude, spelled as JobTypeName stores them. null means no exclusion.

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

Property Value

IReadOnlyCollection<string>

Remarks

Every shipped store honours this. The in-memory store compares FullName ordinally; the ADO.NET store threads the names into ExcludedJobTypeNames and excludes the rows in SQL, where comparison is exact according to the job-class column's collation — case sensitivity follows that collation and is not guaranteed to be ordinal. The two agree in practice because 4.x writes the name the same way it compares it.

A row written by 2.x or 3.x can carry an older spelling, and the read side deliberately never rewrites a stored name, so an exclusion will not match such a row. Matching is exact: there is no prefix or wildcard form.

Entries must be non-blank, and there may be at most 1,000 of them — Oracle's ceiling on an IN list. Both are checked here rather than at acquisition time.

Exceptions

ArgumentException

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

ExecutionLimits

Per-execution-group thread counts still available, which is the configured ExecutionLimits less what is already running here. A limit of null means unlimited and 0 means the group must not fire. null when no execution limits are configured, in which case a store may ignore execution groups entirely.

public ExecutionLimits? ExecutionLimits { get; init; }

Property Value

ExecutionLimits

Remarks

Only Node limits arrive already lowered. A Cluster limit arrives as configured, because this node's own firings are reservations the store is holding and taking them off here as well would count them twice. A store that means to honour cluster-scoped limits — every store whose Clustered can be true — subtracts its own in-flight count when it builds the ledger, through CreateSlots(IReadOnlyCollection<ExecutionGroupInFlight>?). A store that does not, or one that has no cluster to speak of, simply enforces the configured number, which for a single node is the same thing.

MaxCount

The maximum number of triggers to return. Must be at least one.

public int MaxCount { get; init; }

Property Value

int

NoLaterThan

Highest value of NextFireTimeUtc of the triggers to acquire. A store must not return a trigger that would fire later than this.

public required DateTimeOffset NoLaterThan { get; init; }

Property Value

DateTimeOffset

TimeWindow

How far past NoLaterThan a trigger may fire and still be batched into the same acquisition. Must not be negative.

public TimeSpan TimeWindow { get; init; }

Property Value

TimeSpan

See Also