|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.evolveum.midpoint.task.quartzimpl.execution.ExecutionManager
public class ExecutionManager
Manages task threads (clusterwide). Concerned mainly with stopping threads and querying their state.
Constructor Summary | |
---|---|
ExecutionManager(TaskManagerQuartzImpl taskManager)
|
Method Summary | |
---|---|
ClusterStatusInformation |
getClusterStatusInformation(boolean clusterwide,
OperationResult parentResult)
|
java.util.Set<Task> |
getLocallyRunningTasks()
|
java.lang.Long |
getNextRunStartTime(java.lang.String oid,
OperationResult result)
|
org.quartz.Scheduler |
getQuartzScheduler()
|
void |
initializeLocalScheduler()
|
boolean |
removeTaskFromQuartz(java.lang.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(java.lang.String nodeIdentifier,
OperationResult parentResult)
|
boolean |
stopAllTasksOnThisNodeAndWait(long timeToWait,
OperationResult parentResult)
Signals all running tasks that they have to finish. |
void |
stopScheduler(java.lang.String nodeIdentifier,
OperationResult parentResult)
|
boolean |
stopSchedulerAndTasksLocally(long timeToWait,
OperationResult result)
|
boolean |
stopSchedulersAndTasks(java.util.List<java.lang.String> nodeList,
long timeToWait,
OperationResult parentResult)
|
boolean |
stopTasksRunAndWait(java.util.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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExecutionManager(TaskManagerQuartzImpl taskManager)
Method Detail |
---|
public void stopScheduler(java.lang.String nodeIdentifier, OperationResult parentResult)
public boolean stopSchedulersAndTasks(java.util.List<java.lang.String> nodeList, long timeToWait, OperationResult parentResult)
public void startScheduler(java.lang.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(java.util.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(java.lang.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 java.lang.Long getNextRunStartTime(java.lang.String oid, OperationResult result)
public boolean synchronizeJobStores(OperationResult result)
public java.util.Set<Task> getLocallyRunningTasks()
public void initializeLocalScheduler() throws TaskManagerInitializationException
TaskManagerInitializationException
public void scheduleTaskNow(Task task, OperationResult parentResult)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |