public class DefaultTaskDeleteService extends Object implements TaskDeleteService
TaskDeleteService
interface. Provide service
methods for Task deletion.Modifier and Type | Field and Description |
---|---|
protected org.springframework.cloud.dataflow.audit.service.AuditRecordService |
auditRecordService |
protected DataflowJobExecutionDaoContainer |
dataflowJobExecutionDaoContainer |
protected DataflowTaskExecutionDaoContainer |
dataflowTaskExecutionDaoContainer |
protected DataflowTaskExecutionMetadataDaoContainer |
dataflowTaskExecutionMetadataDaoContainer |
Constructor and Description |
---|
DefaultTaskDeleteService(org.springframework.cloud.dataflow.aggregate.task.AggregateTaskExplorer taskExplorer,
LauncherRepository launcherRepository,
TaskDefinitionRepository taskDefinitionRepository,
TaskDeploymentRepository taskDeploymentRepository,
org.springframework.cloud.dataflow.audit.service.AuditRecordService auditRecordService,
DataflowTaskExecutionDaoContainer dataflowTaskExecutionDaoContainer,
DataflowJobExecutionDaoContainer dataflowJobExecutionDaoContainer,
DataflowTaskExecutionMetadataDaoContainer dataflowTaskExecutionMetadataDaoContainer,
SchedulerService schedulerService,
org.springframework.cloud.dataflow.schema.service.SchemaService schemaService,
TaskConfigurationProperties taskConfigurationProperties,
DataSource dataSource) |
Modifier and Type | Method and Description |
---|---|
void |
cleanupExecution(long id,
String schemaTarget)
Cleanup the resources that resulted from running the task with the given execution id.
|
void |
cleanupExecutions(Set<TaskExecutionControllerDeleteAction> actionsAsSet,
Set<Long> ids,
String schemaTarget)
Cleanup the resources that resulted from running the task with the given execution
ids and actions.
|
void |
cleanupExecutions(Set<TaskExecutionControllerDeleteAction> actionsAsSet,
String taskName,
boolean completed)
Clean up the resources that resulted from running the task with the given name.
|
void |
cleanupExecutions(Set<TaskExecutionControllerDeleteAction> actionsAsSet,
String taskName,
boolean completed,
Integer days)
Clean up the resources that resulted from running the task with the given name.
|
void |
deleteAll()
Destroy all task definitions.
|
void |
deleteTaskDefinition(String name)
Destroy the task definition.
|
void |
deleteTaskDefinition(String name,
boolean cleanup)
Destroy the task definition.
|
void |
deleteTaskExecutions(Set<Long> taskExecutionIds,
String schemaTarget)
Delete one or more Task executions.
|
void |
deleteTaskExecutions(String taskName,
boolean onlyCompleted)
Delete task executions by name and execution state.
|
protected final org.springframework.cloud.dataflow.audit.service.AuditRecordService auditRecordService
protected final DataflowTaskExecutionDaoContainer dataflowTaskExecutionDaoContainer
protected final DataflowJobExecutionDaoContainer dataflowJobExecutionDaoContainer
protected final DataflowTaskExecutionMetadataDaoContainer dataflowTaskExecutionMetadataDaoContainer
public DefaultTaskDeleteService(org.springframework.cloud.dataflow.aggregate.task.AggregateTaskExplorer taskExplorer, LauncherRepository launcherRepository, TaskDefinitionRepository taskDefinitionRepository, TaskDeploymentRepository taskDeploymentRepository, org.springframework.cloud.dataflow.audit.service.AuditRecordService auditRecordService, DataflowTaskExecutionDaoContainer dataflowTaskExecutionDaoContainer, DataflowJobExecutionDaoContainer dataflowJobExecutionDaoContainer, DataflowTaskExecutionMetadataDaoContainer dataflowTaskExecutionMetadataDaoContainer, SchedulerService schedulerService, org.springframework.cloud.dataflow.schema.service.SchemaService schemaService, TaskConfigurationProperties taskConfigurationProperties, DataSource dataSource)
@Transactional public void cleanupExecution(long id, String schemaTarget)
TaskDeleteService
cleanupExecution
in interface TaskDeleteService
id
- the execution id@Transactional public void cleanupExecutions(Set<TaskExecutionControllerDeleteAction> actionsAsSet, String taskName, boolean completed)
TaskDeleteService
cleanupExecutions
in interface TaskDeleteService
actionsAsSet
- the actions to performtaskName
- the task namecompleted
- whether to include only completed tasks@Transactional public void cleanupExecutions(Set<TaskExecutionControllerDeleteAction> actionsAsSet, String taskName, boolean completed, Integer days)
TaskDeleteService
cleanupExecutions
in interface TaskDeleteService
actionsAsSet
- the actions to performtaskName
- the task namecompleted
- whether to include only completed tasks (ignored when includeTasksEndedMinDaysAgo
is specified)days
- only include tasks that have ended at least this many days ago@Transactional public void cleanupExecutions(Set<TaskExecutionControllerDeleteAction> actionsAsSet, Set<Long> ids, String schemaTarget)
TaskDeleteService
cleanupExecutions
in interface TaskDeleteService
actionsAsSet
- the actionsids
- the id's@Transactional public void deleteTaskExecutions(Set<Long> taskExecutionIds, String schemaTarget)
TaskDeleteService
deleteTaskExecutions
in interface TaskDeleteService
taskExecutionIds
- Collection of task execution ids to delete. Must contain at least 1 id.public void deleteTaskExecutions(String taskName, boolean onlyCompleted)
TaskDeleteService
deleteTaskExecutions
in interface TaskDeleteService
taskName
- the name of the task executionsonlyCompleted
- indicator to delete only completed taskspublic void deleteTaskDefinition(String name)
TaskDeleteService
deleteTaskDefinition
in interface TaskDeleteService
name
- The name of the task.public void deleteTaskDefinition(String name, boolean cleanup)
TaskDeleteService
deleteTaskDefinition
in interface TaskDeleteService
name
- The name of the task.cleanup
- the flag to indicate the cleanup of the task executions for the task definition.public void deleteAll()
TaskDeleteService
deleteAll
in interface TaskDeleteService
Copyright © 2023 Pivotal Software, Inc.. All rights reserved.