Struct TriggerAcquisitionSqlShape
- Namespace
- Quartz.Impl.AdoJobStore
- Assembly
- Quartz.dll
Everything about one acquisition attempt that changes the text of the statement, and nothing that does not.
public readonly record struct TriggerAcquisitionSqlShape : IEquatable<TriggerAcquisitionSqlShape>
- Implements
- Inherited Members
Remarks
This is what GetSelectNextTriggerToAcquireSql(TriggerAcquisitionSqlShape) is handed, and it is also the key the finished statement is cached under — the same object, because a statement is a pure function of its shape. Two attempts of the same shape are the same string, so the dialect builds it once.
It exists so that the next acquisition dimension adds a property here rather than a parameter to
every dialect delegate that overrides the hook. A dialect that only splices in a row limit reads
MaxCount and hands the whole shape to base, and so keeps working when a
dimension it has never heard of is added.
Constructors
TriggerAcquisitionSqlShape(int, int)
Everything about one acquisition attempt that changes the text of the statement, and nothing that does not.
public TriggerAcquisitionSqlShape(int MaxCount, int ExcludedJobTypeBucket)
Parameters
MaxCountintThe most rows the statement may return, already clamped to at least one by the caller. A dialect splices this into its
TOP,LIMIT,ROWSorrownumclause.ExcludedJobTypeBucketintHow many
NOT INterms the job-type exclusion clause carries, or zero for no clause at all. It is a bucket rather than the caller's exact count because the parameter list is padded up to one of a few sizes, which is what keeps the statement cache — and the database's plan cache — from growing an entry per distinct exclusion count.
Remarks
This is what GetSelectNextTriggerToAcquireSql(TriggerAcquisitionSqlShape) is handed, and it is also the key the finished statement is cached under — the same object, because a statement is a pure function of its shape. Two attempts of the same shape are the same string, so the dialect builds it once.
It exists so that the next acquisition dimension adds a property here rather than a parameter to
every dialect delegate that overrides the hook. A dialect that only splices in a row limit reads
MaxCount and hands the whole shape to base, and so keeps working when a
dimension it has never heard of is added.
Properties
ExcludedJobTypeBucket
How many NOT IN terms the job-type exclusion clause carries, or zero for no clause at all.
It is a bucket rather than the caller's exact count because the parameter list is padded up to
one of a few sizes, which is what keeps the statement cache — and the database's plan cache —
from growing an entry per distinct exclusion count.
public int ExcludedJobTypeBucket { get; init; }
Property Value
ExecutionGroups
The execution-group routing clause the statement carries, or default for none.
public ExecutionGroupClauseShape ExecutionGroups { get; init; }
Property Value
Remarks
An init property rather than a third positional parameter: the constructor is a public
signature a dialect's tests construct, and a dimension added later goes beside it. The count is
exact rather than bucketed, unlike ExcludedJobTypeBucket, because the filter is
fixed for a node's lifetime: one statement per node, however it is spelled.
MaxCount
The most rows the statement may return, already clamped to at least one by the caller. A dialect
splices this into its TOP, LIMIT, ROWS or rownum clause.
public int MaxCount { get; init; }