Table of Contents

Class SchedulerRef

Namespace
Quartz
Assembly
Quartz.dll

The identity the dashboard and the HTTP API address a scheduler by: its name, and the target it is reached through when it is reached through one.

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

Remarks

Spelled target/name — prod/reporting for a window onto the store attached as prod, w1/QuartzScheduler for the scheduler the HTTP target w1 fronts — and as the bare name for a scheduler that is reached through no target: one of this process, or one AddQuartzHttpClient registered without a Target. A bare key never resolves to a targeted scheduler, so a deployment that fronts one process per name sees nothing change, and two targets may front schedulers of one name without either of them taking the bare key.

Public because a replacement IQuartzApiClient receives keys and needs the one rule for reading them. SchedulerName is positional and Target defaults to null, so new SchedulerRef("x") is the bare form.

Constructors

SchedulerRef(string, string?)

The identity the dashboard and the HTTP API address a scheduler by: its name, and the target it is reached through when it is reached through one.

public SchedulerRef(string SchedulerName, string? Target = null)

Parameters

SchedulerName string

The scheduler's name, as its own process spells it.

Target string

The target the scheduler is reached through, or null for one reached through none. A target name never contains Separator.

Remarks

Spelled target/name — prod/reporting for a window onto the store attached as prod, w1/QuartzScheduler for the scheduler the HTTP target w1 fronts — and as the bare name for a scheduler that is reached through no target: one of this process, or one AddQuartzHttpClient registered without a Target. A bare key never resolves to a targeted scheduler, so a deployment that fronts one process per name sees nothing change, and two targets may front schedulers of one name without either of them taking the bare key.

Public because a replacement IQuartzApiClient receives keys and needs the one rule for reading them. SchedulerName is positional and Target defaults to null, so new SchedulerRef("x") is the bare form.

Fields

Separator

What separates the target from the scheduler's name in a key.

public const char Separator = '/'

Field Value

char

Properties

Key

target/name, or the bare name when Target is null.

public string Key { get; }

Property Value

string

SchedulerName

The scheduler's name, as its own process spells it.

public string SchedulerName { get; init; }

Property Value

string

Target

The target the scheduler is reached through, or null for one reached through none.

public string? Target { get; init; }

Property Value

string

Remarks

Validated on every write, with included: a target containing the separator would make a key that could not be read back.

Methods

Parse(string)

Reads a key: the part before the first Separator is the target and the rest is the scheduler's name. A key with no separator is a bare name, and so is one that starts or ends with it, since neither half of such a key could be a target.

public static SchedulerRef Parse(string key)

Parameters

key string

The key to read.

Returns

SchedulerRef

Remarks

a/b/c is the scheduler b/c behind the target a: a target name never contains the separator, and a scheduler's may.

Exceptions

ArgumentException

key is null or white space.

ToString()

target/name, or the bare name when Target is null.

public override string ToString()

Returns

string