groovyx.gpars.dataflow.operator
Class PoisonPill
java.lang.Object
groovyx.gpars.dataflow.operator.PoisonPill
- All Implemented Interfaces:
- ControlMessage
- Direct Known Subclasses:
- CountingPoisonPill, ImmediateCountingPoisonPill
public class PoisonPill
- extends java.lang.Object
- implements ControlMessage
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.
- Author:
- Vaclav Pech
Date: Oct 6, 2010
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ourInstance
private static final PoisonPill ourInstance
immediateInstance
private static final PoisonPill immediateInstance
immediate
private final boolean immediate
PoisonPill
PoisonPill()
PoisonPill
PoisonPill(boolean immediate)
getInstance
public static PoisonPill getInstance()
- Retrieves a non-immediate poison pill instance
- Returns:
- The shared singleton non-immediate poison pill instance
getImmediateInstance
public static PoisonPill getImmediateInstance()
- Retrieves an immediate poison pill instance
- Returns:
- The shared singleton immediate poison pill instance
isImmediate
public final boolean isImmediate()
countDown
void countDown()