org.codehaus.gpars

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

java.lang.Object
  groovyx.gpars.dataflow.operator.PoisonPill
All Implemented Interfaces:
ControlMessage

public class PoisonPill

Represents the poison for dataflow operators. After receiving the poison a dataflow operator will send the poisson to all its output channels and terminate. Non=immediate poison will allow selectors to keep processing all remaining inputs until these get also poisoned. There§s no difference in behavior between immediate and non=immediate poison pills when obtained bz an operator.

Authors:
Vaclav Pech Date: Oct 6, 2010


Field Summary
private boolean immediate

private static PoisonPill immediateInstance

private static PoisonPill ourInstance

 
Constructor Summary
PoisonPill()

PoisonPill(boolean immediate)

 
Method Summary
void countDown()

static PoisonPill getImmediateInstance()

Retrieves an immediate poison pill instance

static PoisonPill getInstance()

Retrieves a non-immediate poison pill instance

boolean isImmediate()

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

immediate

private final boolean immediate


immediateInstance

private static final PoisonPill immediateInstance


ourInstance

private static final PoisonPill ourInstance


 
Constructor Detail

PoisonPill

PoisonPill()


PoisonPill

PoisonPill(boolean immediate)


 
Method Detail

countDown

void countDown()


getImmediateInstance

public static PoisonPill getImmediateInstance()
Retrieves an immediate poison pill instance
Returns:
The shared singleton immediate poison pill instance


getInstance

public static PoisonPill getInstance()
Retrieves a non-immediate poison pill instance
Returns:
The shared singleton non-immediate poison pill instance


isImmediate

public final boolean isImmediate()


 

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