public interface TaskService
Modifier and Type | Field and Description |
---|---|
static long |
DO_NOT_STOP |
static long |
DO_NOT_WAIT |
static long |
WAIT_INDEFINITELY |
Modifier and Type | Method and Description |
---|---|
boolean |
deactivateServiceThreads(long timeToWait,
OperationResult parentResult)
Deactivates service threads (temporarily).
|
List<String> |
getAllTaskCategories()
Gets a list of all task categories.
|
String |
getHandlerUriForCategory(String category)
Returns a default handler URI for a given task category.
|
boolean |
getServiceThreadsActivationState()
Returns true if the service threads are running.
|
com.evolveum.midpoint.prism.PrismObject<TaskType> |
getTaskByIdentifier(String identifier,
Collection<SelectorOptions<GetOperationOptions>> options,
OperationResult parentResult)
Returns information about task, given its identifier.
|
void |
reactivateServiceThreads(OperationResult parentResult)
Re-activates the service threads after they have been deactivated.
|
void |
resumeTasks(Collection<String> taskOids,
OperationResult parentResult)
Resume suspended tasks.
|
void |
scheduleTasksNow(Collection<String> taskOids,
OperationResult parentResult)
Schedules a RUNNABLE/CLOSED tasks to be run immediately.
|
void |
startSchedulers(Collection<String> nodeIdentifiers,
OperationResult result)
Starts the scheduler on a given nodes.
|
void |
stopSchedulers(Collection<String> nodeIdentifiers,
OperationResult parentResult)
Stops the schedulers on a given nodes.
|
boolean |
stopSchedulersAndTasks(Collection<String> nodeIdentifiers,
long waitTime,
OperationResult parentResult)
Stops a set of schedulers (on their nodes) and tasks that are executing on these nodes.
|
void |
suspendAndDeleteTasks(Collection<String> taskOids,
long waitForStop,
boolean alsoSubtasks,
OperationResult parentResult)
Suspends tasks and deletes them.
|
boolean |
suspendTasks(Collection<String> taskOids,
long waitForStop,
OperationResult parentResult)
Suspends a set of tasks.
|
void |
synchronizeTasks(OperationResult parentResult)
Synchronizes information in midPoint repository and task scheduling database.
|
static final long WAIT_INDEFINITELY
static final long DO_NOT_WAIT
static final long DO_NOT_STOP
boolean suspendTasks(Collection<String> taskOids, long waitForStop, OperationResult parentResult)
taskOids
- a collection of OIDs of tasks that have to be suspendedwaitTime
- how long (in milliseconds) to wait for stopping the execution of tasks;
WAIT_INDEFINITELY means wait indefinitely :)
DO_NOT_WAIT means stop the tasks, but do not wait for finishing their execution
DO_NOT_STOP means do not try to stop the task execution. Tasks will only be put into SUSPENDED state, and
their executions (if any) will be left as they are. Use this option only when you know what you're doing.parentResult
- void suspendAndDeleteTasks(Collection<String> taskOids, long waitForStop, boolean alsoSubtasks, OperationResult parentResult)
taskOids
- Collection of task OIDs to be suspended and deleted.waitForStop
- How long (in milliseconds) to wait for task stop before proceeding with deletion.
WAIT_INDEFINITELY means wait indefinitely :)
DO_NOT_WAIT means stop the tasks, but do not wait for finishing their execution
DO_NOT_STOP means do not try to stop the task execution. Tasks will only be put into SUSPENDED state, andalsoSubtasks
- Should also subtasks be deleted?parentResult
- void resumeTasks(Collection<String> taskOids, OperationResult parentResult)
taskOids
- a collection of OIDs of tasks that have to be resumedSchemaException
ObjectNotFoundException
void scheduleTasksNow(Collection<String> taskOids, OperationResult parentResult)
taskOids
- a collection of OIDs of tasks that have to be scheduledparentResult
- com.evolveum.midpoint.prism.PrismObject<TaskType> getTaskByIdentifier(String identifier, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult parentResult) throws SchemaException, ObjectNotFoundException
identifier
- options
- parentResult
- SchemaException
ObjectNotFoundException
boolean deactivateServiceThreads(long timeToWait, OperationResult parentResult)
void reactivateServiceThreads(OperationResult parentResult)
boolean getServiceThreadsActivationState()
void stopSchedulers(Collection<String> nodeIdentifiers, OperationResult parentResult)
nodeIdentifiers
- Nodes on which the schedulers should be stopped.boolean stopSchedulersAndTasks(Collection<String> nodeIdentifiers, long waitTime, OperationResult parentResult)
nodeIdentifiers
- collection of node identifierswaitTime
- how long to wait for task shutdown, in milliseconds
WAIT_INDEFINITELY means wait indefinitely
DO_NOT_WAIT means stop the tasks, but do not wait for finishing their executionparentResult
- void startSchedulers(Collection<String> nodeIdentifiers, OperationResult result)
nodeIdentifiers
- Nodes on which the scheduler should be started.void synchronizeTasks(OperationResult parentResult)
parentResult
- List<String> getAllTaskCategories()
Copyright © 2014 Evolveum. All rights reserved.