|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.multiverse.api.blocking.DefaultRetryLatch
public final class DefaultRetryLatch
A Cheap RetryLatch implementation based on the intrinsic lock.
| Constructor Summary | |
|---|---|
DefaultRetryLatch()
|
|
| Method Summary | |
|---|---|
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. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultRetryLatch()
| Method Detail |
|---|
public void open(long expectedEra)
RetryLatch
open in interface RetryLatchexpectedEra - the expected era.
public void await(long expectedEra,
String transactionFamilyName)
RetryLatch
await in interface RetryLatchexpectedEra - the expected era.transactionFamilyName - the name of the transaction (only needed for creating
a usable message in the RetryInterruptedException).public void awaitUninterruptible(long expectedEra)
RetryLatch
awaitUninterruptible in interface RetryLatchexpectedEra - the expected era. If the era is different, the await always succeeds.
public long awaitNanosUninterruptible(long expectedEra,
long nanosTimeout)
RetryLatch
awaitNanosUninterruptible in interface RetryLatchexpectedEra - the expected era.nanosTimeout - the timeout in nanoseconds
public long awaitNanos(long expectedEra,
long nanosTimeout,
String transactionFamilyName)
RetryLatch
awaitNanos in interface RetryLatchexpectedEra - 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).
public long getEra()
RetryLatch
getEra in interface RetryLatchpublic void reset()
RetryLatch
reset in interface RetryLatchpublic boolean isOpen()
RetryLatch
isOpen in interface RetryLatchpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||