groovyx.gpars.dataflow.operator
Class ForkingDataflowSelectorActor
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.DataflowSelectorActor
groovyx.gpars.dataflow.operator.ForkingDataflowSelectorActor
- All Implemented Interfaces:
- java.io.Serializable
final class ForkingDataflowSelectorActor
- extends DataflowSelectorActor
An selector's internal actor. Repeatedly polls inputs and once they're all available it performs the selector's body.
The selector'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(int index,
java.lang.Object result)
|
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
ForkingDataflowSelectorActor
ForkingDataflowSelectorActor(DataflowSelector owningOperator,
PGroup group,
java.util.List outputs,
java.util.List inputs,
groovy.lang.Closure code,
int maxForks)
startTask
void startTask(int index,
java.lang.Object result)
- Overrides:
startTask
in class DataflowSelectorActor
forwardPoisonPill
protected void forwardPoisonPill(java.lang.Object data)
- Overrides:
forwardPoisonPill
in class DataflowProcessorActor