public static final class LocalTaskQueueTestConfig.TaskCountDownLatch
extends java.util.concurrent.CountDownLatch
Constructor and Description |
---|
LocalTaskQueueTestConfig.TaskCountDownLatch(int count) |
Modifier and Type | Method and Description |
---|---|
void |
await() |
boolean |
await(long timeout,
java.util.concurrent.TimeUnit unit) |
void |
awaitAndReset()
|
void |
awaitAndReset(int count)
Shorthand for calling
await() followed by reset(int) . |
boolean |
awaitAndReset(long timeout,
java.util.concurrent.TimeUnit unit)
Shorthand for calling
await(long, java.util.concurrent.TimeUnit) followed by
reset() . |
boolean |
awaitAndReset(long timeout,
java.util.concurrent.TimeUnit unit,
int count)
Shorthand for calling
await(long, java.util.concurrent.TimeUnit) followed by
reset(int) . |
void |
countDown() |
long |
getCount() |
void |
reset()
Resets the latch to its most recent initial count.
|
void |
reset(int count)
Resets the latch to the provided count.
|
java.lang.String |
toString() |
public LocalTaskQueueTestConfig.TaskCountDownLatch(int count)
public long getCount()
getCount
in class java.util.concurrent.CountDownLatch
public java.lang.String toString()
toString
in class java.util.concurrent.CountDownLatch
public void await() throws java.lang.InterruptedException
await
in class java.util.concurrent.CountDownLatch
java.lang.InterruptedException
public boolean await(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
await
in class java.util.concurrent.CountDownLatch
java.lang.InterruptedException
public void countDown()
countDown
in class java.util.concurrent.CountDownLatch
public void awaitAndReset() throws java.lang.InterruptedException
java.lang.InterruptedException
public void awaitAndReset(int count) throws java.lang.InterruptedException
await()
followed by reset(int)
.
Only one thread at a time should call this.java.lang.InterruptedException
public boolean awaitAndReset(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
await(long, java.util.concurrent.TimeUnit)
followed by
reset()
. Only one thread at a time should call this.java.lang.InterruptedException
public boolean awaitAndReset(long timeout, java.util.concurrent.TimeUnit unit, int count) throws java.lang.InterruptedException
await(long, java.util.concurrent.TimeUnit)
followed by
reset(int)
. Only one thread at a time should call this.java.lang.InterruptedException
public void reset()
public void reset(int count)