Interface ITaskScheduler
-
public interface ITaskSchedulerthe scheduler interface ofDriverTask
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidblockedToReady(DriverTask task)Switch a task fromDriverTaskStatus.BLOCKEDtoDriverTaskStatus.READY.booleanreadyToRunning(DriverTask task)Switch a task fromDriverTaskStatus.READYtoDriverTaskStatus.RUNNING.voidrunningToBlocked(DriverTask task, ExecutionContext context)Switch a task fromDriverTaskStatus.RUNNINGtoDriverTaskStatus.BLOCKED.voidrunningToFinished(DriverTask task, ExecutionContext context)Switch a task fromDriverTaskStatus.RUNNINGtoDriverTaskStatus.FINISHED.voidrunningToReady(DriverTask task, ExecutionContext context)Switch a task fromDriverTaskStatus.RUNNINGtoDriverTaskStatus.READY.voidtoAborted(DriverTask task)Switch a task toDriverTaskStatus.ABORTED.
-
-
-
Method Detail
-
blockedToReady
void blockedToReady(DriverTask task)
Switch a task fromDriverTaskStatus.BLOCKEDtoDriverTaskStatus.READY.- Parameters:
task- the task to be switched.
-
readyToRunning
boolean readyToRunning(DriverTask task)
Switch a task fromDriverTaskStatus.READYtoDriverTaskStatus.RUNNING.- Parameters:
task- the task to be switched.- Returns:
- true if it's switched to the target status successfully, otherwise false.
-
runningToReady
void runningToReady(DriverTask task, ExecutionContext context)
Switch a task fromDriverTaskStatus.RUNNINGtoDriverTaskStatus.READY.- Parameters:
task- the task to be switched.context- the execution context of last running.
-
runningToBlocked
void runningToBlocked(DriverTask task, ExecutionContext context)
Switch a task fromDriverTaskStatus.RUNNINGtoDriverTaskStatus.BLOCKED.- Parameters:
task- the task to be switched.context- the execution context of last running.
-
runningToFinished
void runningToFinished(DriverTask task, ExecutionContext context)
Switch a task fromDriverTaskStatus.RUNNINGtoDriverTaskStatus.FINISHED.- Parameters:
task- the task to be switched.context- the execution context of last running.
-
toAborted
void toAborted(DriverTask task)
Switch a task toDriverTaskStatus.ABORTED.- Parameters:
task- the task to be switched.
-
-