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.
|
PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.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.
|
void |
synchronizeWorkflowRequests(OperationResult parentResult)
Synchronizes information in midPoint repository and activiti 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) throws SecurityViolationException, ObjectNotFoundException, SchemaException
taskOids
- a collection of OIDs of tasks that have to be suspendedwaitForStop
- 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
- SecurityViolationException
ObjectNotFoundException
SchemaException
void suspendAndDeleteTasks(Collection<String> taskOids, long waitForStop, boolean alsoSubtasks, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException
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, and
their executions (if any) will be left as they are. Use this option only when you know what you're doing.alsoSubtasks
- Should also subtasks be deleted?parentResult
- SecurityViolationException
ObjectNotFoundException
SchemaException
void resumeTasks(Collection<String> taskOids, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException
taskOids
- a collection of OIDs of tasks that have to be resumedSchemaException
ObjectNotFoundException
SecurityViolationException
void scheduleTasksNow(Collection<String> taskOids, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException
taskOids
- a collection of OIDs of tasks that have to be scheduledparentResult
- SecurityViolationException
ObjectNotFoundException
SchemaException
PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.TaskType> getTaskByIdentifier(String identifier, Collection<SelectorOptions<GetOperationOptions>> options, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, ConfigurationException, SecurityViolationException
identifier
- options
- parentResult
- SchemaException
ObjectNotFoundException
ConfigurationException
SecurityViolationException
boolean deactivateServiceThreads(long timeToWait, OperationResult parentResult) throws SchemaException, SecurityViolationException
void reactivateServiceThreads(OperationResult parentResult) throws SchemaException, SecurityViolationException
boolean getServiceThreadsActivationState()
void stopSchedulers(Collection<String> nodeIdentifiers, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException
nodeIdentifiers
- Nodes on which the schedulers should be stopped.SecurityViolationException
ObjectNotFoundException
SchemaException
boolean stopSchedulersAndTasks(Collection<String> nodeIdentifiers, long waitTime, OperationResult parentResult) throws SecurityViolationException, ObjectNotFoundException, SchemaException
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
- SecurityViolationException
ObjectNotFoundException
SchemaException
void startSchedulers(Collection<String> nodeIdentifiers, OperationResult result) throws SecurityViolationException, ObjectNotFoundException, SchemaException
nodeIdentifiers
- Nodes on which the scheduler should be started.SecurityViolationException
ObjectNotFoundException
SchemaException
void synchronizeTasks(OperationResult parentResult) throws SchemaException, SecurityViolationException
parentResult
- SchemaException
SecurityViolationException
void synchronizeWorkflowRequests(OperationResult parentResult) throws SchemaException, SecurityViolationException
parentResult
- SchemaException
SecurityViolationException
List<String> getAllTaskCategories()
Copyright © 2016 evolveum. All rights reserved.