Represents an immediate PoisonPill that counts stopped operators and can be used to wait for all the operators to terminate.
Modifiers | Name | Description |
---|---|---|
private PoisonTrackCounter |
poisonTrackCounter |
Fields inherited from class | Fields |
---|---|
class PoisonPill |
immediate, immediateInstance, ourInstance |
Constructor and description |
---|
ImmediateCountingPoisonPill
(int count) Creates an immediate instance that could be used to stop operators in a network. |
Type | Name and description |
---|---|
void |
countDown() |
Promise<java.lang.Boolean> |
getTermination() Retrieves the promise for termination |
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 |
Methods inherited from class | Name |
---|---|
class PoisonPill |
countDown, getImmediateInstance, getInstance, isImmediate |
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Creates an immediate instance that could be used to stop operators in a network.
count
- The number of operators that need to be stopped before the join() method returns.Retrieves the promise for termination
Blocks until the number of terminated operators reaches the number specified in the constructor
Blocks until the number of terminated operators reaches the number specified in the constructor
timeout
- the maximum time to waitunit
- the time unit of the timeout
argumentCopyright © 2008–2014 Václav Pech. All Rights Reserved.