|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.pipeline.common.TaskManager
public abstract class TaskManager
All task instances within a pipeline are managed by a task manager. This manager is not responsible for the creation of the task, but it is responsible for connecting it to its input and output tasks and responsible for managing the invocation of the task.
Constructor Summary | |
---|---|
protected |
TaskManager(java.lang.String taskId,
java.util.Map<java.lang.String,java.lang.String> pipeArgs)
Creates a new instance. |
Method Summary | |
---|---|
abstract void |
connect(PipeTasks pipeTasks)
Connects the task to any input tasks based upon the pipes created by source tasks, and makes any output pipes available to be used by subsequent sink tasks. |
abstract void |
execute()
Begins execution of the task. |
protected Task |
getInputTask(PipeTasks pipeTasks,
int pipeIndex,
java.lang.Class<? extends Task> requiredTaskType)
Finds the specified pipe task, unregisters it from the available tasks and returns it. |
protected java.lang.String |
getTaskId()
|
protected void |
setOutputTask(PipeTasks pipeTasks,
Task outputTask,
int pipeIndex)
Registers the specified task as an output. |
abstract boolean |
waitForCompletion()
Waits until all tasks have completed execution before returning. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected TaskManager(java.lang.String taskId, java.util.Map<java.lang.String,java.lang.String> pipeArgs)
taskId
- A unique identifier for the task. This is used to produce
meaningful errors when errors occur.pipeArgs
- The arguments defining input and output pipes for the task,
pipes are a logical concept for identifying how the tasks are
connected together.Method Detail |
---|
protected Task getInputTask(PipeTasks pipeTasks, int pipeIndex, java.lang.Class<? extends Task> requiredTaskType)
pipeTasks
- The currently registered pipe tasks.pipeIndex
- The input pipe index for the current task.requiredTaskType
- The required type of the input task.
protected void setOutputTask(PipeTasks pipeTasks, Task outputTask, int pipeIndex)
pipeTasks
- The currently registered pipe tasks.outputTask
- The task to be registered.pipeIndex
- The index of the pipe on the current task.protected java.lang.String getTaskId()
public abstract void connect(PipeTasks pipeTasks)
pipeTasks
- The currently registered pipe tasks. This will be modified to
remove any consumed inputs, and modified to add new outputs.public abstract void execute()
public abstract boolean waitForCompletion()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |