final class PoisonTrackCounter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.concurrent.atomic.AtomicInteger |
counter |
private DataflowVariable<java.lang.Boolean> |
termination |
Constructor and Description |
---|
PoisonTrackCounter(int count) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
countDown() |
Promise<java.lang.Boolean> |
getTermination() |
void |
join()
Blocks until the number of terminated operators reaches the number specified in the constructor
|
void |
join(long timeout,
java.util.concurrent.TimeUnit unit)
Blocks until the number of terminated operators reaches the number specified in the constructor
|
private final DataflowVariable<java.lang.Boolean> termination
private final java.util.concurrent.atomic.AtomicInteger counter
public void join() throws java.lang.InterruptedException
java.lang.InterruptedException
- If the current thread gets interrupted during the blockingpublic void join(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
timeout
- the maximum time to waitunit
- the time unit of the timeout
argumentjava.lang.InterruptedException
- If the current thread gets interrupted during the blockingpublic Promise<java.lang.Boolean> getTermination()
void countDown()