|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgpars.group.PGroup
class PGroup
Provides a common super class of pooled actor groups.
Constructor Summary | |
protected PGroup(Pool threadPool)
Creates a group for actors, agents, tasks and operators. |
Method Summary | |
---|---|
AbstractPooledActor
|
actor(Runnable handler)
Creates a new instance of PooledActor, using the passed-in runnable/closure as the body of the actor's act() method. |
Agent
|
agent(def state)
Creates an agent instance initialized with the given state |
Agent
|
agent(def state, groovy.lang.Closure copy)
Creates an agent instance initialized with the given state |
Agent
|
fairAgent(def state)
Creates an agent instance initialized with the given state, which will cooperate in thread sharing with other Agent instances in a fair manner. |
Agent
|
fairAgent(def state, groovy.lang.Closure copy)
Creates an agent instance initialized with the given state, which will cooperate in thread sharing with other Agent instances in a fair manner. |
Pool
|
getThreadPool()
|
AbstractPooledActor
|
messageHandler(groovy.lang.Closure code)
Creates an instance of DynamicDispatchActor. |
DataFlowOperator
|
operator(Map channels, groovy.lang.Closure code)
Creates an operator using the current actor group |
AbstractPooledActor
|
reactor(groovy.lang.Closure code)
Creates a reactor around the supplied code. |
void
|
task(groovy.lang.Closure code)
Creates a new task assigned to a thread from the current actor group. |
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Constructor Detail |
---|
protected PGroup(Pool threadPool)
Method Detail |
---|
public final AbstractPooledActor actor(Runnable handler)
public final Agent agent(def state)
public final Agent agent(def state, groovy.lang.Closure copy)
public final Agent fairAgent(def state)
public final Agent fairAgent(def state, groovy.lang.Closure copy)
public Pool getThreadPool()
public final AbstractPooledActor messageHandler(groovy.lang.Closure code)
public DataFlowOperator operator(Map channels, groovy.lang.Closure code)
public final AbstractPooledActor reactor(groovy.lang.Closure code)
public void task(groovy.lang.Closure code)
Groovy Documentation