com.google.appengine.tools.development.testing
Class LocalTaskQueueTestConfig.TaskCountDownLatch
- java.lang.Object
-
- java.util.concurrent.CountDownLatch
-
- com.google.appengine.tools.development.testing.LocalTaskQueueTestConfig.TaskCountDownLatch
-
- Enclosing class:
- LocalTaskQueueTestConfig
public static final class LocalTaskQueueTestConfig.TaskCountDownLatch extends java.util.concurrent.CountDownLatch
-
-
Constructor Summary
Constructors Constructor and Description TaskCountDownLatch(int count)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidawait()booleanawait(long timeout, java.util.concurrent.TimeUnit unit)voidawaitAndReset()voidawaitAndReset(int count)Shorthand for callingawait()followed byreset(int).booleanawaitAndReset(long timeout, java.util.concurrent.TimeUnit unit)Shorthand for callingawait(long, java.util.concurrent.TimeUnit)followed byreset().booleanawaitAndReset(long timeout, java.util.concurrent.TimeUnit unit, int count)Shorthand for callingawait(long, java.util.concurrent.TimeUnit)followed byreset(int).voidcountDown()longgetCount()voidreset()Resets the latch to its most recent initial count.voidreset(int count)Resets the latch to the provided count.java.lang.StringtoString()
-
-
-
Method Detail
-
getCount
public long getCount()
- Overrides:
getCountin classjava.util.concurrent.CountDownLatch
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.util.concurrent.CountDownLatch
-
await
public void await() throws java.lang.InterruptedException- Overrides:
awaitin classjava.util.concurrent.CountDownLatch- Throws:
java.lang.InterruptedException
-
await
public boolean await(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException- Overrides:
awaitin classjava.util.concurrent.CountDownLatch- Throws:
java.lang.InterruptedException
-
countDown
public void countDown()
- Overrides:
countDownin classjava.util.concurrent.CountDownLatch
-
awaitAndReset
public void awaitAndReset() throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
awaitAndReset
public void awaitAndReset(int count) throws java.lang.InterruptedExceptionShorthand for callingawait()followed byreset(int). Only one thread at a time should call this.- Throws:
java.lang.InterruptedException
-
awaitAndReset
public boolean awaitAndReset(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedExceptionShorthand for callingawait(long, java.util.concurrent.TimeUnit)followed byreset(). Only one thread at a time should call this.- Throws:
java.lang.InterruptedException
-
awaitAndReset
public boolean awaitAndReset(long timeout, java.util.concurrent.TimeUnit unit, int count) throws java.lang.InterruptedExceptionShorthand for callingawait(long, java.util.concurrent.TimeUnit)followed byreset(int). Only one thread at a time should call this.- Throws:
java.lang.InterruptedException
-
reset
public void reset()
Resets the latch to its most recent initial count. Only one thread at a time should call this.
-
reset
public void reset(int count)
Resets the latch to the provided count. Only one thread at a time should call this.
-
-