|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.concurrent.CountDownLatch com.google.appengine.tools.development.testing.LocalTaskQueueTestConfig.TaskCountDownLatch
public static final class LocalTaskQueueTestConfig.TaskCountDownLatch
A CountDownLatch
extension that can be reset. Pass an instance of
this class to LocalTaskQueueTestConfig#setTaskExecutionLatch)
when
you need to reuse the latch within or across tests. Only one thread at a
time should ever call any of the await()
or reset()
methods.
Constructor Summary | |
---|---|
LocalTaskQueueTestConfig.TaskCountDownLatch(int count)
|
Method Summary | |
---|---|
void |
await()
|
boolean |
await(long timeout,
java.util.concurrent.TimeUnit unit)
|
void |
awaitAndReset()
Shorthand for calling await() followed by reset() . |
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LocalTaskQueueTestConfig.TaskCountDownLatch(int count)
Method Detail |
---|
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
await()
followed by reset()
.
Only one thread at a time should call this.
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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |