public class StaticScheduler<I,O,T extends Task<I,O>>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOG |
Constructor and Description |
---|
StaticScheduler(java.util.List<T> tasks) |
Modifier and Type | Method and Description |
---|---|
void |
cleanInputQueue()
Clean the queue of input
|
T |
getTask(int taskID)
Get the Task by its ID
|
boolean |
hasError(int taskID)
Check if has errors on this task
|
boolean |
hasOutput(int taskID)
Check if has a new output
|
void |
pause()
Pause the scheduling
|
void |
start()
Start to schedule tasks
|
void |
stop()
Stop scheduling
|
void |
submit(int taskID,
I input)
Submit the input to task
|
O |
waitForOutput(int taskID)
Blocked and wait for output.
|
public StaticScheduler(java.util.List<T> tasks)
public T getTask(int taskID)
taskID
- the ID of the taskpublic void submit(int taskID, I input)
taskID
- the ID of the taskinput
- the inputpublic void start()
public void pause()
public void cleanInputQueue()
public void stop()
public O waitForOutput(int taskID)
public boolean hasOutput(int taskID)
taskID
- the ID of the taskpublic boolean hasError(int taskID)
taskID
- the ID of the task