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 io.molr.commons.domain.Block
block
protected java.util.Map<io.molr.commons.domain.Block,ConcurrentStrandExecutor>
childExecutors
protected int
concurrencyLimit
protected java.util.Set<ConcurrentStrandExecutor>
finishedChildren
protected java.util.Set<ConcurrentStrandExecutor>
runningExecutors
protected java.util.Set<io.molr.commons.domain.Block>
toBeExecuted
protected java.util.Queue<io.molr.commons.domain.Block>
waitingForInstantiation
-
Fields inherited from class io.molr.mole.core.tree.executor.StrandExecutionState
context
-
-
Constructor Summary
Constructors Constructor Description ExecuteChildrenState(io.molr.commons.domain.Block block, ConcurrentStrandExecutor context)
ExecuteChildrenState(ConcurrentStrandExecutor context, io.molr.commons.domain.Block block, java.util.Map<io.molr.commons.domain.Block,ConcurrentStrandExecutor> childExecutors, java.util.Set<ConcurrentStrandExecutor> finishedChildren, java.util.Set<io.molr.commons.domain.Block> toBeExecuted, java.util.Queue<io.molr.commons.domain.Block> waitingForInstantiation, java.util.Set<ConcurrentStrandExecutor> runningExecutors, int concurrencyLimit)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
areAllChildrenPaused()
void
instructChildren(io.molr.commons.domain.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 io.molr.commons.domain.Block block
-
childExecutors
protected final java.util.Map<io.molr.commons.domain.Block,ConcurrentStrandExecutor> childExecutors
-
finishedChildren
protected final java.util.Set<ConcurrentStrandExecutor> finishedChildren
-
toBeExecuted
protected final java.util.Set<io.molr.commons.domain.Block> toBeExecuted
-
waitingForInstantiation
protected final java.util.Queue<io.molr.commons.domain.Block> waitingForInstantiation
-
runningExecutors
protected final java.util.Set<ConcurrentStrandExecutor> runningExecutors
-
concurrencyLimit
protected final int concurrencyLimit
-
-
Constructor Detail
-
ExecuteChildrenState
public ExecuteChildrenState(io.molr.commons.domain.Block block, ConcurrentStrandExecutor context)
-
ExecuteChildrenState
public ExecuteChildrenState(ConcurrentStrandExecutor context, io.molr.commons.domain.Block block, java.util.Map<io.molr.commons.domain.Block,ConcurrentStrandExecutor> childExecutors, java.util.Set<ConcurrentStrandExecutor> finishedChildren, java.util.Set<io.molr.commons.domain.Block> toBeExecuted, java.util.Queue<io.molr.commons.domain.Block> waitingForInstantiation, java.util.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(io.molr.commons.domain.StrandCommand command)
-
-