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 void
await()
boolean
await(long timeout, java.util.concurrent.TimeUnit unit)
void
awaitAndReset()
void
awaitAndReset(int count)
Shorthand for callingawait()
followed byreset(int)
.boolean
awaitAndReset(long timeout, java.util.concurrent.TimeUnit unit)
Shorthand for callingawait(long, java.util.concurrent.TimeUnit)
followed byreset()
.boolean
awaitAndReset(long timeout, java.util.concurrent.TimeUnit unit, int count)
Shorthand for callingawait(long, java.util.concurrent.TimeUnit)
followed byreset(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()
-
-
-
Method Detail
-
getCount
public long getCount()
- Overrides:
getCount
in classjava.util.concurrent.CountDownLatch
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.util.concurrent.CountDownLatch
-
await
public void await() throws java.lang.InterruptedException
- Overrides:
await
in classjava.util.concurrent.CountDownLatch
- Throws:
java.lang.InterruptedException
-
await
public boolean await(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
- Overrides:
await
in classjava.util.concurrent.CountDownLatch
- Throws:
java.lang.InterruptedException
-
countDown
public void countDown()
- Overrides:
countDown
in 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.InterruptedException
Shorthand 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.InterruptedException
Shorthand 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.InterruptedException
Shorthand 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.
-
-