Struct ExecutionGroupScope
- Namespace
- Quartz
- Assembly
- Quartz.dll
Which bucket an execution limit applies to: the default (ungrouped) bucket, the catch-all for groups not explicitly configured, one named group, or the family of groups that start with a prefix.
public readonly record struct ExecutionGroupScope : IEquatable<ExecutionGroupScope>
- Implements
- Inherited Members
Remarks
This is the read-side shape of what ExecutionLimitsBuilder writes:
ForDefaultGroup(int, ExecutionLimitScope) configures Default,
ForOtherGroups(int, ExecutionLimitScope) configures OtherGroups,
ForGroup(string, int, ExecutionLimitScope) / Unlimited(string)
configure Named(string) scopes, and ForGroupsWithPrefix(string, int, ExecutionLimitScope)
configures GroupsWithPrefix(string) ones. Configuration keys keep their own spellings (_
or null for the default bucket, * for the catch-all, tenant:* for a prefix);
this type exists so code reading limits back never has to know them.
Modeled on PreferredNode, the other place a closed set of cases refuses to be a nullable string with a sentinel.
Properties
Default
The bucket for triggers that have no execution group (ExecutionGroup is null). The default value of this type.
public static ExecutionGroupScope Default { get; }
Property Value
IsDefault
Whether this is the bucket for triggers that have no execution group.
public bool IsDefault { get; }
Property Value
IsOtherGroups
Whether this is the catch-all for named groups not explicitly configured.
public bool IsOtherGroups { get; }
Property Value
IsPrefix
Whether this is the family of groups that start with Prefix.
public bool IsPrefix { get; }
Property Value
Name
The group name of a Named(string) scope; null for the others.
public string? Name { get; }
Property Value
OtherGroups
The catch-all applied to any named group not explicitly configured. It never applies to ungrouped triggers — those always read Default.
public static ExecutionGroupScope OtherGroups { get; }
Property Value
Prefix
The prefix of a GroupsWithPrefix(string) scope; null for the others.
public string? Prefix { get; }
Property Value
Methods
GroupsWithPrefix(string)
The scope of every execution group that starts with prefix, each of which is
allowed the limit on its own.
public static ExecutionGroupScope GroupsWithPrefix(string prefix)
Parameters
prefixstringThe start of the group names, such as
tenant:.
Returns
Exceptions
- ArgumentNullException
prefixis null.- ArgumentException
prefixis blank, or ends with the*only a configuration key spells.
Named(string)
The scope of one named execution group.
public static ExecutionGroupScope Named(string name)
Parameters
namestringThe execution group name.
Returns
Exceptions
- ArgumentNullException
nameis null.- ArgumentException
nameis blank or one of the names reserved by limits configuration. Use Default for ungrouped triggers and OtherGroups for the catch-all.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.