JobStoreTXExecuteInLockT Method (String, FuncConnectionAndTransactionHolder, TaskT, CancellationToken)

Quartz.NET 3.0 API Documentation
Execute the given callback having optionally acquired the given lock. For JobStoreTX, because it manages its own transactions and only has the one datasource, this is the same behavior as ExecuteInNonManagedTXLock(String, FuncConnectionAndTransactionHolder, Task, CancellationToken).

Namespace:  Quartz.Impl.AdoJobStore
Assembly:  Quartz (in Quartz.dll) Version: 3.0.0
Syntax

C#
protected override Task<T> ExecuteInLock<T>(
	string lockName,
	Func<ConnectionAndTransactionHolder, Task<T>> txCallback,
	CancellationToken cancellationToken = null
)

Parameters

lockName
Type: SystemString
The name of the lock to acquire, for example "TRIGGER_ACCESS". If null, then no lock is acquired, but the lockCallback is still executed in a transaction.
txCallback
Type: SystemFuncConnectionAndTransactionHolder, TaskT
Callback to execute.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
The cancellation instruction.

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "M:Quartz.Impl.AdoJobStore.JobStoreTX.ExecuteInLock``1(System.String,System.Func{Quartz.Impl.AdoJobStore.ConnectionAndTransactionHolder,System.Threading.Tasks.Task{``0}},System.Threading.CancellationToken)"]

Return Value

Type: TaskT

[Missing <returns> documentation for "M:Quartz.Impl.AdoJobStore.JobStoreTX.ExecuteInLock``1(System.String,System.Func{Quartz.Impl.AdoJobStore.ConnectionAndTransactionHolder,System.Threading.Tasks.Task{``0}},System.Threading.CancellationToken)"]

See Also

Reference