org.codehaus.gpars

groovyx.gpars.dataflow.operator
[Java] Class CountingPoisonPill

java.lang.Object
  groovyx.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.

Authors:
Vaclav Pech


Field Summary
private PoisonTrackCounter poisonTrackCounter

 
Fields inherited from class PoisonPill
immediate, immediateInstance, ourInstance
 
Constructor Summary
CountingPoisonPill(int count)

 
Method Summary
void countDown()

Promise getTermination()

void join()

void join(long timeout, java.util.concurrent.TimeUnit unit)

Retrieves the promise for termination

 
Methods inherited from class PoisonPill
countDown, getImmediateInstance, getInstance, isImmediate
 

Field Detail

poisonTrackCounter

private final PoisonTrackCounter poisonTrackCounter


 
Constructor Detail

CountingPoisonPill

public CountingPoisonPill(int count)


 
Method Detail

countDown

@java.lang.Override
void countDown()


getTermination

public Promise getTermination()


join

public void join()


join

public void join(long timeout, java.util.concurrent.TimeUnit unit)
Retrieves the promise for termination
Returns:
A Promise instance that will be bound when all the requested dataflow processors have been terminated


 

Copyright © 2008–2013 Václav Pech. All Rights Reserved.