org.codehaus.gpars

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

java.lang.Object
  groovyx.gpars.dataflow.operator.PoisonTrackCounter

final class PoisonTrackCounter

A helper class used by poison messages to count terminated dataflow processors

Authors:
Vaclav Pech


Field Summary
private java.util.concurrent.atomic.AtomicInteger counter

private DataflowVariable termination

 
Constructor Summary
PoisonTrackCounter(int count)

 
Method Summary
void countDown()

Promise 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)

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), 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()
 

Field Detail

counter

private final java.util.concurrent.atomic.AtomicInteger counter


termination

private final DataflowVariable termination


 
Constructor Detail

PoisonTrackCounter

PoisonTrackCounter(int count)


 
Method Detail

countDown

void countDown()


getTermination

public Promise getTermination()


join

public void join()
Blocks until the number of terminated operators reaches the number specified in the constructor
throws:
InterruptedException If the current thread gets interrupted during the blocking
Parameters:
timeout - the maximum time to wait
unit - the time unit of the timeout argument


join

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


 

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