public class StandaloneTaskManager extends AbstractQuartzTaskManager
AbstractQuartzTaskManager.TaskTriggerListener
TaskManager.TaskState
Constructor and Description |
---|
StandaloneTaskManager(TaskRepository taskRepository) |
Modifier and Type | Method and Description |
---|---|
boolean |
deleteTask(String taskName)
Stops and deletes a task with the given name.
|
List<TaskInfo> |
getAllTasks()
Get all task information.
|
TaskInfo |
getTask(String taskName)
Get task information.
|
TaskManager.TaskState |
getTaskState(String taskName)
Gets tasks state information
|
void |
initStartupTasks()
Initialize the startup tasks.
|
boolean |
isTaskScheduled(String taskName)
Checks if the given task is already scheduled.
|
void |
pauseTask(String taskName)
Pauses a task with the given name.
|
void |
registerTask(TaskInfo taskInfo)
Registers a new task or updates if one already exists.
|
void |
rescheduleTask(String taskName)
Reschedules a task with the given name, only the trigger information will be updated in the
reschedule.
|
void |
resumeTask(String taskName)
Resumes a paused task with the given name.
|
void |
scheduleTask(String taskName)
Starts a task with the given name.
|
deleteLocalTask, deleteLocalTasks, getAllFinishedTasks, getAllLocalRunningTasks, getAllLocalTaskStates, getLocalTaskState, getScheduler, getTaskRepository, getTaskType, getTenantId, isLocalTaskScheduled, pauseLocalTask, registerLocalTask, registerLocalTaskActionListener, rescheduleLocalTask, resumeLocalTask, scheduleAllTasks, scheduleLocalTask, scheduleLocalTask
public StandaloneTaskManager(TaskRepository taskRepository) throws org.wso2.carbon.ntask.common.TaskException
org.wso2.carbon.ntask.common.TaskException
public void initStartupTasks() throws org.wso2.carbon.ntask.common.TaskException
TaskManager
org.wso2.carbon.ntask.common.TaskException
public void scheduleTask(String taskName) throws org.wso2.carbon.ntask.common.TaskException
TaskManager
taskName
- The name of the taskorg.wso2.carbon.ntask.common.TaskException
public boolean deleteTask(String taskName) throws org.wso2.carbon.ntask.common.TaskException
TaskManager
taskName
- The name of the taskorg.wso2.carbon.ntask.common.TaskException
public void pauseTask(String taskName) throws org.wso2.carbon.ntask.common.TaskException
TaskManager
taskName
- The name of the taskorg.wso2.carbon.ntask.common.TaskException
public void registerTask(TaskInfo taskInfo) throws org.wso2.carbon.ntask.common.TaskException
TaskManager
taskInfo
- The task informationorg.wso2.carbon.ntask.common.TaskException
public TaskManager.TaskState getTaskState(String taskName) throws org.wso2.carbon.ntask.common.TaskException
TaskManager
taskName
- The name of the taskorg.wso2.carbon.ntask.common.TaskException
public TaskInfo getTask(String taskName) throws org.wso2.carbon.ntask.common.TaskException
TaskManager
taskName
- The name of the taskorg.wso2.carbon.ntask.common.TaskException
- if the task cannot be foundpublic List<TaskInfo> getAllTasks() throws org.wso2.carbon.ntask.common.TaskException
TaskManager
org.wso2.carbon.ntask.common.TaskException
public void rescheduleTask(String taskName) throws org.wso2.carbon.ntask.common.TaskException
TaskManager
taskName
- The task to be rescheduledorg.wso2.carbon.ntask.common.TaskException
public void resumeTask(String taskName) throws org.wso2.carbon.ntask.common.TaskException
TaskManager
taskName
- The name of the taskorg.wso2.carbon.ntask.common.TaskException
public boolean isTaskScheduled(String taskName) throws org.wso2.carbon.ntask.common.TaskException
TaskManager
taskName
- The task nameorg.wso2.carbon.ntask.common.TaskException
Copyright © 2019 WSO2. All rights reserved.