public interface RetryLatch
Modifier and Type | Method and Description |
---|---|
void |
await(long expectedEra,
String transactionFamilyName)
Awaits for this Latch to open.
|
long |
awaitNanos(long expectedEra,
long nanosTimeout,
String transactionFamilyName)
Awaits for this latch to open with a timeout.
|
long |
awaitNanosUninterruptible(long expectedEra,
long nanosTimeout)
Awaits for this latch to open with a timeout.
|
void |
awaitUninterruptible(long expectedEra)
Awaits for this latch to open.
|
long |
getEra()
Gets the current era.
|
boolean |
isOpen()
Checks if the Latch is open.
|
void |
open(long expectedEra)
Opens this latch only if the expectedEra is the same.
|
void |
reset()
Prepares the Latch for pooling.
|
boolean isOpen()
void open(long expectedEra)
expectedEra
- the expected era.long getEra()
void awaitUninterruptible(long expectedEra)
expectedEra
- the expected era. If the era is different, the await always succeeds.void await(long expectedEra, String transactionFamilyName)
expectedEra
- the expected era.transactionFamilyName
- the name of the transaction (only needed for creating
a usable message in the RetryInterruptedException).RetryInterruptedException
long awaitNanosUninterruptible(long expectedEra, long nanosTimeout)
expectedEra
- the expected era.nanosTimeout
- the timeout in nanosecondslong awaitNanos(long expectedEra, long nanosTimeout, String transactionFamilyName)
expectedEra
- the expected erananosTimeout
- the timeout in nanoseconds. Can safely be called with a zero or negative timeouttransactionFamilyName
- the name of the transaction (only needed for creating
a usable message in the RetryInterruptedException).RetryInterruptedException
void reset()
Copyright © 2020. All rights reserved.