org.codehaus.gpars

groovyx.gpars.dataflow.operator
[Groovy] 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.DynamicDispatchActor
                      groovyx.gpars.dataflow.operator.DataflowProcessorActor
                          groovyx.gpars.dataflow.operator.DataflowOperatorActor
                              groovyx.gpars.dataflow.operator.ForkingDataflowOperatorActor

private 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.


Field Summary
private java.util.concurrent.Semaphore semaphore

private java.lang.Object threadPool

 
Fields inherited from class DataflowProcessorActor
code, inputs, outputs, owningProcessor
 
Fields inherited from class DynamicDispatchActor
serialVersionUID
 
Fields inherited from class AbstractLoopingActor
core, currentSender, currentTimerTask, serialVersionUID, stoppedFlag, terminatedFlag, terminatingFlag, timeoutCounter
 
Fields inherited from class Actor
ACTOR_HAS_ALREADY_BEEN_STARTED, AFTER_START, CANNOT_SEND_REPLIES_NO_SENDER_HAS_BEEN_REGISTERED, EMPTY_ARGUMENTS, ON_DELIVERY_ERROR, RESPONDS_TO, START_MESSAGE, STOP_MESSAGE, TERMINATE_MESSAGE, TIMEOUT, TIMEOUT_MESSAGE, currentActorPerThread, currentThread, joinLatch, onStop, parallelGroup, serialVersionUID, timer
 
Fields inherited from class MessageStream
serialVersionUID
 
Fields inherited from class WithSerialId
serialHandle, serialVersionUID
 
Constructor Summary
ForkingDataflowOperatorActor(java.lang.Object owningOperator, java.lang.Object group, java.lang.Object outputs, java.lang.Object inputs, java.lang.Object code, java.lang.Object maxForks)

 
Method Summary
java.lang.Object startTask(java.lang.Object results)

 
Methods inherited from class DataflowOperatorActor
afterStart, onMessage, queryInputs, startTask
 
Methods inherited from class DataflowProcessorActor
checkPoison, onMessage, reportException, send
 
Methods inherited from class DynamicDispatchActor
become, when
 
Methods inherited from class AbstractLoopingActor
cancelCurrentTimeoutTask, doStart, getCore, getSender, hasBeenStopped, initialize, isActive, isFair, makeFair, reply, replyIfExists, runEnhancedWithoutRepliesOnMessages, send, setParallelGroup, setTimeout, silentStart, start, stop, sweepNextMessage, terminate
 
Methods inherited from class Actor
callDynamic, createActorMessage, createRemoteHandle, deregisterCurrentActorWithThread, getJoinLatch, getParallelGroup, handleException, handleInterrupt, handleStart, handleTermination, handleTimeout, hasBeenStopped, isActive, isActorThread, join, join, join, join, onStop, registerCurrentActorWithThread, sendAndContinue, setParallelGroup, silentStart, start, stop, sweepNextMessage, sweepQueue, terminate, threadBoundActor
 
Methods inherited from class MessageStream
call, getRemoteClass, leftShift, reInterrupt, send, send, send, sendAndWait, sendAndWait, sendAndWait
 
Methods inherited from class WithSerialId
createRemoteHandle, getOrCreateSerialHandle, getRemoteClass, writeReplace
 
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

semaphore

private final java.util.concurrent.Semaphore semaphore


threadPool

private final java.lang.Object threadPool


 
Constructor Detail

ForkingDataflowOperatorActor

ForkingDataflowOperatorActor(java.lang.Object owningOperator, java.lang.Object group, java.lang.Object outputs, java.lang.Object inputs, java.lang.Object code, java.lang.Object maxForks)


 
Method Detail

startTask

@Override
java.lang.Object startTask(java.lang.Object results)


 

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