public interface LockManager
| Modifier and Type | Method and Description |
|---|---|
boolean |
acquireLock()
Acquire the lock.
|
void |
releaseLock()
Release the lock.
|
void |
waitForLock(Duration waitTime)
Wait for the given
waitTime to acquire the lock |
<T> T |
waitForLockRunAndRelease(Duration waitTime,
Supplier<T> supplier)
Wait to acquire a lock, once a lock is acquired execute the supplier and release finally the lock.
|
void waitForLock(Duration waitTime)
waitTime to acquire the lockwaitTime - the duration to wait before throwing an exceptionboolean acquireLock()
true if the lock was acquired, false otherwisevoid releaseLock()
<T> T waitForLockRunAndRelease(Duration waitTime, Supplier<T> supplier)
waitTime - the duration to wait before throwing an exceptionsupplier - the supplier to be executed once the lock is acquiredsupplierCopyright © 2021 Flowable. All rights reserved.