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
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
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
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
RefusedExecutionGroups
The execution groups this node never acquires, with every other one served. The same entries and rules as ServedExecutionGroups, and exclusive with it. null means no filtering.
public IReadOnlyCollection<ExecutionGroupScope>? RefusedExecutionGroups { get; init; }
Property Value
Exceptions
- ArgumentException
An entry is the catch-all or a prefix, an entry repeats, there are too many of them, or ServedExecutionGroups is set as well.
ServedExecutionGroups
The execution groups this node serves, and nothing else: named groups, and Default for the triggers that carry none. null means no filtering.
public IReadOnlyCollection<ExecutionGroupScope>? ServedExecutionGroups { get; init; }
Property Value
Remarks
What ServedExecutionGroups configures, as the scheduler
thread hands it to the store. Every shipped store honours it: the in-memory store compares
ExecutionGroup ordinally and the ADO.NET store keeps the rows out in SQL,
where comparison follows the EXECUTION_GROUP column's collation. A trigger the filter
declines is not acquired and is not misfire-handled by this node; it waits, unmodified, for a
node that serves it.
Entries are named groups or the default bucket; the catch-all and a prefix are refused, as is a duplicate, and there may be at most 1,000 entries. Exclusive with RefusedExecutionGroups.
Exceptions
- ArgumentException
An entry is the catch-all or a prefix, an entry repeats, there are too many of them, or RefusedExecutionGroups is set as well.
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; }