Interface TaskDeleteService
- All Known Implementing Classes:
DefaultTaskDeleteService
public interface TaskDeleteService
Provides task deletion services.
- Author:
- Daniel Serleg, Gunnar Hillert, Ilayaperumal Gopinathan
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanupExecution
(long id) Cleanup the resources that resulted from running the task with the given execution id.void
cleanupExecutions
(Set<TaskExecutionControllerDeleteAction> actionsAsSet, String taskName, boolean onlyCompleted) Clean up the resources that resulted from running the task with the given name.void
cleanupExecutions
(Set<TaskExecutionControllerDeleteAction> actionsAsSet, String taskName, boolean onlyCompleted, Integer includeTasksEndedMinDaysAgo) Clean up the resources that resulted from running the task with the given name.void
cleanupExecutions
(Set<TaskExecutionControllerDeleteAction> actionsAsSet, Set<Long> ids) Cleanup the resources that resulted from running the task with the given execution ids and actions.void
Destroy all task definitions.void
deleteTaskDefinition
(String name) Destroy the task definition.void
deleteTaskDefinition
(String name, boolean cleanup) Destroy the task definition.void
deleteTaskExecutions
(String taskName, boolean onlyCompleted) Delete task executions by name and execution state.void
deleteTaskExecutions
(Set<Long> ids) Delete one or more Task executions.
-
Method Details
-
cleanupExecution
void cleanupExecution(long id) Cleanup the resources that resulted from running the task with the given execution id.- Parameters:
id
- the execution id
-
cleanupExecutions
Cleanup the resources that resulted from running the task with the given execution ids and actions.- Parameters:
actionsAsSet
- the actionsids
- the id's
-
cleanupExecutions
void cleanupExecutions(Set<TaskExecutionControllerDeleteAction> actionsAsSet, String taskName, boolean onlyCompleted) Clean up the resources that resulted from running the task with the given name.- Parameters:
actionsAsSet
- the actions to performtaskName
- the task nameonlyCompleted
- whether to include only completed tasks
-
cleanupExecutions
void cleanupExecutions(Set<TaskExecutionControllerDeleteAction> actionsAsSet, String taskName, boolean onlyCompleted, Integer includeTasksEndedMinDaysAgo) Clean up the resources that resulted from running the task with the given name.- Parameters:
actionsAsSet
- the actions to performtaskName
- the task nameonlyCompleted
- whether to include only completed tasks (ignored whenincludeTasksEndedMinDaysAgo
is specified)includeTasksEndedMinDaysAgo
- only include tasks that have ended at least this many days ago- Since:
- 2.11.0
-
deleteTaskExecutions
Delete one or more Task executions.- Parameters:
ids
- Collection of task execution ids to delete. Must contain at least 1 id.
-
deleteTaskExecutions
Delete task executions by name and execution state.- Parameters:
taskName
- the name of the task executionsonlyCompleted
- indicator to delete only completed tasks
-
deleteTaskDefinition
Destroy the task definition. If it is a Composed Task then the task definitions required for a ComposedTaskRunner task are also destroyed.- Parameters:
name
- The name of the task.
-
deleteTaskDefinition
Destroy the task definition. If it is a Composed Task then the task definitions required for a ComposedTaskRunner task are also destroyed. If the cleanup flag is set to true, delete all the task executions associated with the task definition.- Parameters:
name
- The name of the task.cleanup
- the flag to indicate the cleanup of the task executions for the task definition.
-
deleteAll
void deleteAll()Destroy all task definitions. If it is a Composed Task then the task definitions required for a ComposedTaskRunner tasks are also destroyed.
-