Class LockHandlerContext
- Namespace
- Quartz.Impl.AdoJobStore
- Assembly
- Quartz.dll
The identity of the scheduler a lock handler locks for and the environment it locks in, handed to Initialize(LockHandlerContext) once by the job store before the handler is used.
public sealed record LockHandlerContext : IEquatable<LockHandlerContext>
- Inheritance
-
LockHandlerContext
- Implements
- Inherited Members
Properties
CommandTimeout
How long the handler's statements may run before the provider cancels them, from CommandTimeout. null leaves the provider's own default in place, and a handler that does not lock in the database ignores this.
public TimeSpan? CommandTimeout { get; init; }
Property Value
Remarks
The lock statement is where a timeout earns its keep: a node waiting on QRTZ_LOCKS behind
a peer that stopped without releasing the row cannot make progress until the statement gives up.
InstanceId
The identifier of this scheduler node within a cluster.
public required string InstanceId { get; init; }
Property Value
LoggerFactory
The factory the handler creates its logger from, defaulting to Instance.
public ILoggerFactory LoggerFactory { get; init; }
Property Value
Remarks
The job store passes the factory its container gave it, so lock contention, retries and the handler's own failures reach an application that never set LogProvider. A handler initialized by hand is handed nothing and logs nowhere.
SchedulerName
Name of the scheduler whose scheduling data the lock protects.
public required string SchedulerName { get; init; }
Property Value
TablePrefix
Table prefix of the tables the ADO.NET job store uses. A handler that does not lock in the database ignores this.
public required string TablePrefix { get; init; }
Property Value
TimeProvider
The clock the store runs on, defaulting to System. A handler that backs off between attempts waits on this rather than on wall time, so its retry behaviour can be tested without the test waiting too.
public TimeProvider TimeProvider { get; init; }