I
- Input type of task FarmO
- Output type of task FarmT
- Type of the parallelized stagepublic class DynamicTaskFarmStage<I,O,T extends ITaskFarmDuplicable<I,O>> extends StaticTaskFarmStage<I,O,T>
DEFAULT_PIPE_CAPACITY
Constructor and Description |
---|
DynamicTaskFarmStage(T workerStage,
int initialNumOfStages)
Creates a task farm using a worker stage with a pipe capacity of 100.
|
DynamicTaskFarmStage(T workerStage,
int initialNumOfStages,
int pipeCapacity)
Creates a task farm using a worker stage with a given pipe capacity.
|
Modifier and Type | Method and Description |
---|---|
ITaskFarmDuplicable<I,O> |
addStageAtRuntime()
Adds a new enclosed stage at Runtime
|
ITaskFarmDuplicable<I,O> |
getBasicEnclosedStage()
Returns the first instance of the worker stages enclosed in the task farm.
|
TaskFarmConfiguration<I,O,T> |
getConfiguration() |
ITaskFarmDuplicable<I,O> |
removeStageAtRuntime()
Dynamically removes a stage from the controlled task farm.
|
getInputPort, getOutputPort, getPipeCapacity, getWorkerStages
connectPorts, connectPorts, createInputPort, createOutputPort
public DynamicTaskFarmStage(T workerStage, int initialNumOfStages)
workerStage
- stage to be parallelized by the task farminitialNumOfStages
- the initial number of stages used by the task farmpublic DynamicTaskFarmStage(T workerStage, int initialNumOfStages, int pipeCapacity)
workerStage
- stage to be parallelized by the task farmpipeCapacity
- pipe capacity to be usedinitialNumOfStages
- the initial number of stages used by the task farmpublic ITaskFarmDuplicable<I,O> addStageAtRuntime() throws InterruptedException
InterruptedException
public ITaskFarmDuplicable<I,O> removeStageAtRuntime() throws InterruptedException
InterruptedException
public ITaskFarmDuplicable<I,O> getBasicEnclosedStage()
public TaskFarmConfiguration<I,O,T> getConfiguration()
Copyright © 2015–2020. All rights reserved.