groovyx.gpars.dataflow.operator
Class ForkingDataflowOperatorActor
java.lang.Object
groovyx.gpars.serial.WithSerialId
groovyx.gpars.actor.impl.MessageStream
groovyx.gpars.actor.Actor
groovyx.gpars.actor.AbstractLoopingActor
groovyx.gpars.actor.StaticDispatchActor<java.lang.Object>
groovyx.gpars.dataflow.operator.DataflowProcessorActor
groovyx.gpars.dataflow.operator.DataflowOperatorActor
groovyx.gpars.dataflow.operator.ForkingDataflowOperatorActor
- All Implemented Interfaces:
- java.io.Serializable
final class ForkingDataflowOperatorActor
- extends DataflowOperatorActor
An operator's internal actor. Repeatedly polls inputs and once they're all available it performs the operator's body.
The operator's body is executed in as a separate task, allowing multiple copies of the body to be run concurrently.
The maxForks property guards the maximum number or concurrently run copies.
- Author:
- Vaclav Pech
Method Summary |
protected void |
forwardPoisonPill(java.lang.Object data)
|
(package private) void |
startTask(java.util.List<java.lang.Object> results)
|
Methods inherited from class groovyx.gpars.actor.AbstractLoopingActor |
getSender, hasBeenStopped, initialize, isActive, isFair, makeFair, reply, replyIfExists, setParallelGroup, setTimeout, silentStart, start, stop, sweepNextMessage, terminate |
Methods inherited from class groovyx.gpars.actor.Actor |
createActorMessage, createRemoteHandle, deregisterCurrentActorWithThread, getJoinLatch, getParallelGroup, handleException, handleInterrupt, handleStart, handleTermination, handleTimeout, isActorThread, join, join, join, join, onStop, registerCurrentActorWithThread, sendAndContinue, sendAndPromise, threadBoundActor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
semaphore
private final java.util.concurrent.Semaphore semaphore
threadPool
private final Pool threadPool
maxForks
private final int maxForks
ForkingDataflowOperatorActor
ForkingDataflowOperatorActor(DataflowOperator owningOperator,
PGroup group,
java.util.List outputs,
java.util.List inputs,
groovy.lang.Closure code,
int maxForks)
startTask
void startTask(java.util.List<java.lang.Object> results)
- Overrides:
startTask
in class DataflowOperatorActor
forwardPoisonPill
protected void forwardPoisonPill(java.lang.Object data)
- Overrides:
forwardPoisonPill
in class DataflowProcessorActor