Package io.molr.mole.core.tree.executor
Class ExecuteChildrenState
- java.lang.Object
-
- io.molr.mole.core.tree.executor.StrandExecutionState
-
- io.molr.mole.core.tree.executor.ExecuteChildrenState
-
- Direct Known Subclasses:
ExecuteChildrenPausedState
,ExecuteChildrenRunningState
public abstract class ExecuteChildrenState extends StrandExecutionState
-
-
Field Summary
Fields Modifier and Type Field Description protected Block
block
protected Map<Block,ConcurrentStrandExecutor>
childExecutors
protected int
concurrencyLimit
protected Set<ConcurrentStrandExecutor>
finishedChildren
protected Set<ConcurrentStrandExecutor>
runningExecutors
protected Set<Block>
toBeExecuted
protected Queue<Block>
waitingForInstantiation
-
Fields inherited from class io.molr.mole.core.tree.executor.StrandExecutionState
context
-
-
Constructor Summary
Constructors Constructor Description ExecuteChildrenState(Block block, ConcurrentStrandExecutor context)
ExecuteChildrenState(ConcurrentStrandExecutor context, Block block, Map<Block,ConcurrentStrandExecutor> childExecutors, Set<ConcurrentStrandExecutor> finishedChildren, Set<Block> toBeExecuted, Queue<Block> waitingForInstantiation, Set<ConcurrentStrandExecutor> runningExecutors, int concurrencyLimit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
areAllChildrenPaused()
void
instructChildren(StrandCommand command)
protected boolean
isAnyChildrenRunning()
void
pauseChildren()
protected void
removeCompletedChildExecutors()
void
resumeChildren()
void
run()
-
Methods inherited from class io.molr.mole.core.tree.executor.StrandExecutionState
allowedCommands, executeCommand, onEnterState
-
-
-
-
Field Detail
-
block
protected final Block block
-
childExecutors
protected final Map<Block,ConcurrentStrandExecutor> childExecutors
-
finishedChildren
protected final Set<ConcurrentStrandExecutor> finishedChildren
-
runningExecutors
protected final Set<ConcurrentStrandExecutor> runningExecutors
-
concurrencyLimit
protected final int concurrencyLimit
-
-
Constructor Detail
-
ExecuteChildrenState
public ExecuteChildrenState(Block block, ConcurrentStrandExecutor context)
-
ExecuteChildrenState
public ExecuteChildrenState(ConcurrentStrandExecutor context, Block block, Map<Block,ConcurrentStrandExecutor> childExecutors, Set<ConcurrentStrandExecutor> finishedChildren, Set<Block> toBeExecuted, Queue<Block> waitingForInstantiation, Set<ConcurrentStrandExecutor> runningExecutors, int concurrencyLimit)
-
-
Method Detail
-
removeCompletedChildExecutors
protected void removeCompletedChildExecutors()
-
run
public void run()
- Specified by:
run
in classStrandExecutionState
-
isAnyChildrenRunning
protected boolean isAnyChildrenRunning()
-
areAllChildrenPaused
protected boolean areAllChildrenPaused()
-
resumeChildren
public void resumeChildren()
-
pauseChildren
public void pauseChildren()
-
instructChildren
public void instructChildren(StrandCommand command)
-
-