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.CountDownLatchpublic java.lang.String toString()
toString in class java.util.concurrent.CountDownLatchpublic void await()
throws java.lang.InterruptedException
await in class java.util.concurrent.CountDownLatchjava.lang.InterruptedExceptionpublic boolean await(long timeout,
java.util.concurrent.TimeUnit unit)
throws java.lang.InterruptedException
await in class java.util.concurrent.CountDownLatchjava.lang.InterruptedExceptionpublic void countDown()
countDown in class java.util.concurrent.CountDownLatchpublic void awaitAndReset()
throws java.lang.InterruptedException
java.lang.InterruptedExceptionpublic void awaitAndReset(int count)
throws java.lang.InterruptedException
await() followed by reset(int).
Only one thread at a time should call this.java.lang.InterruptedExceptionpublic 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.InterruptedExceptionpublic 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.InterruptedExceptionpublic void reset()
public void reset(int count)