| 
 | org.codehaus.gpars | |||||||
| FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectgroovyx.gpars.dataflow.operator.PoisonPill
groovyx.gpars.dataflow.operator.CountingPoisonPill
public final class CountingPoisonPill extends PoisonPill
Represents a non-immediate PoisonPill that counts stopped operators and can be used to wait for all the operators to terminate.
| Field Summary | |
|---|---|
| private PoisonTrackCounter | poisonTrackCounter | 
| Fields inherited from class PoisonPill | |
|---|---|
| immediate, immediateInstance, ourInstance | 
| Constructor Summary | |
| CountingPoisonPill(int count)Creates a non-immediate instance that could be used to stop operators in a network. | |
| Method Summary | |
|---|---|
| void | countDown() | 
| Promise | 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 PoisonPill | |
|---|---|
| countDown, getImmediateInstance, getInstance, isImmediate | 
| Field Detail | 
|---|
private final PoisonTrackCounter poisonTrackCounter
| Constructor Detail | 
|---|
public CountingPoisonPill(int count)
count -  The number of operators that need to be stopped before the join() method returns.
| Method Detail | 
|---|
@Override void countDown()
public Promise getTermination()
public void join()
public void join(long timeout, java.util.concurrent.TimeUnit unit)
timeout -  the maximum time to waitunit -     the time unit of the timeout argument
Copyright © 2008–2012 Václav Pech. All Rights Reserved.