public class ExecutionManager extends Object
Constructor and Description |
---|
ExecutionManager(TaskManagerQuartzImpl taskManager) |
Modifier and Type | Method and Description |
---|---|
ClusterStatusInformation |
getClusterStatusInformation(boolean clusterwide,
OperationResult parentResult) |
Set<Task> |
getLocallyRunningTasks(OperationResult parentResult) |
Long |
getNextRunStartTime(String oid,
OperationResult result) |
org.quartz.Scheduler |
getQuartzScheduler() |
void |
initializeLocalScheduler() |
boolean |
removeTaskFromQuartz(String oid,
OperationResult parentResult)
Removes task from quartz.
|
void |
scheduleTaskNow(Task task,
OperationResult parentResult) |
void |
setQuartzScheduler(org.quartz.Scheduler quartzScheduler) |
void |
shutdownLocalScheduler() |
void |
shutdownLocalSchedulerChecked()
Robust version of 'shutdownScheduler', ignores exceptions, shuts down the scheduler only if not shutdown already.
|
void |
startScheduler(String nodeIdentifier,
OperationResult parentResult) |
boolean |
stopAllTasksOnThisNodeAndWait(long timeToWait,
OperationResult parentResult)
Signals all running tasks that they have to finish.
|
void |
stopScheduler(String nodeIdentifier,
OperationResult parentResult) |
boolean |
stopSchedulerAndTasksLocally(long timeToWait,
OperationResult result) |
boolean |
stopSchedulersAndTasks(List<String> nodeList,
long timeToWait,
OperationResult parentResult) |
boolean |
stopTasksRunAndWait(Collection<Task> tasks,
ClusterStatusInformation csi,
long waitTime,
boolean clusterwide,
OperationResult parentResult)
Stops given set of tasks and waits for their completion.
|
boolean |
synchronizeJobStores(OperationResult result) |
void |
synchronizeTask(TaskQuartzImpl task,
OperationResult result) |
void |
unscheduleTask(Task task,
OperationResult parentResult) |
public ExecutionManager(TaskManagerQuartzImpl taskManager)
public void stopScheduler(String nodeIdentifier, OperationResult parentResult)
public boolean stopSchedulersAndTasks(List<String> nodeList, long timeToWait, OperationResult parentResult)
public void startScheduler(String nodeIdentifier, OperationResult parentResult)
public ClusterStatusInformation getClusterStatusInformation(boolean clusterwide, OperationResult parentResult)
public boolean stopAllTasksOnThisNodeAndWait(long timeToWait, OperationResult parentResult)
timeToWait
- How long to wait (milliseconds); 0 means forever.public boolean stopTasksRunAndWait(Collection<Task> tasks, ClusterStatusInformation csi, long waitTime, boolean clusterwide, OperationResult parentResult)
tasks
- csi
- Cluster status information. Must be relatively current, i.e. got AFTER a moment preventing new tasks
to be scheduled (e.g. when suspending tasks, CSI has to be taken after tasks have been unscheduled;
when stopping schedulers, CSI has to be taken after schedulers were stopped). May be null; in that case
the method will query nodes themselves.waitTime
- How long to wait for task stop. -1 means no wait will be performed.clusterwide
- If false, only tasks running on local node will be stopped.parentResult
- public void unscheduleTask(Task task, OperationResult parentResult)
public boolean removeTaskFromQuartz(String oid, OperationResult parentResult)
oid
- parentResult
- public void setQuartzScheduler(org.quartz.Scheduler quartzScheduler)
public org.quartz.Scheduler getQuartzScheduler()
public void shutdownLocalScheduler() throws TaskManagerException
TaskManagerException
public void shutdownLocalSchedulerChecked()
public boolean stopSchedulerAndTasksLocally(long timeToWait, OperationResult result)
public void synchronizeTask(TaskQuartzImpl task, OperationResult result)
public Long getNextRunStartTime(String oid, OperationResult result)
public boolean synchronizeJobStores(OperationResult result)
public Set<Task> getLocallyRunningTasks(OperationResult parentResult)
public void initializeLocalScheduler() throws TaskManagerInitializationException
public void scheduleTaskNow(Task task, OperationResult parentResult)
Copyright © 2013 evolveum. All rights reserved.