public interface PendingLockPromise
PendingLockManager
.
When a transaction need to wait for older topology transaction, this class allows it to check the state. If the
transaction does not need to wait, or all older transactions have finished or have timed out, the isReady()
method returns true
. Also, it allows the caller to add listeners to be notified when it is ready.
Modifier and Type | Field and Description |
---|---|
static PendingLockPromise |
NO_OP |
Modifier and Type | Method and Description |
---|---|
void |
addListener(PendingLockListener listener)
Adds a listener to this promise.
|
long |
getRemainingTimeout() |
boolean |
hasTimedOut() |
boolean |
isReady() |
static final PendingLockPromise NO_OP
boolean isReady()
true
when the transaction has finished the waiting.void addListener(PendingLockListener listener)
The listener must be non-null and it is invoked only once. If isReady()
returns true
, the listener
is immediately invoked in the invoker thread.
listener
- the PendingLockListener
to add.boolean hasTimedOut()
true
if the time out happened while waiting for older transactions.long getRemainingTimeout()
hasTimedOut()
is true
.Copyright © 2020 JBoss, a division of Red Hat. All rights reserved.