SimpleSemaphoreObtainLock Method

Quartz.NET 3.0 API Documentation
Grants a lock on the identified resource to the calling thread (blocking until it is available).

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

C#
public virtual Task<bool> ObtainLock(
	Guid requestorId,
	ConnectionAndTransactionHolder conn,
	string lockName,
	CancellationToken cancellationToken = null
)

Parameters

requestorId
Type: SystemGuid

[Missing <param name="requestorId"/> documentation for "M:Quartz.Impl.AdoJobStore.SimpleSemaphore.ObtainLock(System.Guid,Quartz.Impl.AdoJobStore.ConnectionAndTransactionHolder,System.String,System.Threading.CancellationToken)"]

conn
Type: Quartz.Impl.AdoJobStoreConnectionAndTransactionHolder

[Missing <param name="conn"/> documentation for "M:Quartz.Impl.AdoJobStore.SimpleSemaphore.ObtainLock(System.Guid,Quartz.Impl.AdoJobStore.ConnectionAndTransactionHolder,System.String,System.Threading.CancellationToken)"]

lockName
Type: SystemString

[Missing <param name="lockName"/> documentation for "M:Quartz.Impl.AdoJobStore.SimpleSemaphore.ObtainLock(System.Guid,Quartz.Impl.AdoJobStore.ConnectionAndTransactionHolder,System.String,System.Threading.CancellationToken)"]

cancellationToken (Optional)
Type: System.ThreadingCancellationToken

[Missing <param name="cancellationToken"/> documentation for "M:Quartz.Impl.AdoJobStore.SimpleSemaphore.ObtainLock(System.Guid,Quartz.Impl.AdoJobStore.ConnectionAndTransactionHolder,System.String,System.Threading.CancellationToken)"]

Return Value

Type: TaskBoolean
True if the lock was obtained.

Implements

ISemaphoreObtainLock(Guid, ConnectionAndTransactionHolder, String, CancellationToken)
See Also

Reference