public final class MultiShotLatch extends Object
OneShotLatch this will
reset the state once await() returns.
A part of the code that should only run after other code calls await(). The call will
only return once the other part is finished and calls trigger().
| Constructor and Description |
|---|
MultiShotLatch() |
| Modifier and Type | Method and Description |
|---|---|
void |
await()
Waits until
trigger() is called. |
boolean |
isTriggered()
Checks if the latch was triggered.
|
void |
trigger()
Fires the latch.
|
public void trigger()
await() will now return.public void await()
throws InterruptedException
trigger() is called.InterruptedExceptionpublic boolean isTriggered()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.