public class DefaultTaskDeleteService extends Object implements TaskDeleteService
TaskDeleteService interface. Provide service
methods for Task deletion.| Modifier and Type | Field and Description |
|---|---|
protected AuditRecordService |
auditRecordService |
protected DataflowJobExecutionDaoContainer |
dataflowJobExecutionDaoContainer |
protected DataflowTaskExecutionDaoContainer |
dataflowTaskExecutionDaoContainer |
protected DataflowTaskExecutionMetadataDaoContainer |
dataflowTaskExecutionMetadataDaoContainer |
| Constructor and Description |
|---|
DefaultTaskDeleteService(AggregateTaskExplorer taskExplorer,
LauncherRepository launcherRepository,
TaskDefinitionRepository taskDefinitionRepository,
TaskDeploymentRepository taskDeploymentRepository,
AuditRecordService auditRecordService,
DataflowTaskExecutionDaoContainer dataflowTaskExecutionDaoContainer,
DataflowJobExecutionDaoContainer dataflowJobExecutionDaoContainer,
DataflowTaskExecutionMetadataDaoContainer dataflowTaskExecutionMetadataDaoContainer,
SchedulerService schedulerService,
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 AuditRecordService auditRecordService
protected final DataflowTaskExecutionDaoContainer dataflowTaskExecutionDaoContainer
protected final DataflowJobExecutionDaoContainer dataflowJobExecutionDaoContainer
protected final DataflowTaskExecutionMetadataDaoContainer dataflowTaskExecutionMetadataDaoContainer
public DefaultTaskDeleteService(AggregateTaskExplorer taskExplorer, LauncherRepository launcherRepository, TaskDefinitionRepository taskDefinitionRepository, TaskDeploymentRepository taskDeploymentRepository, AuditRecordService auditRecordService, DataflowTaskExecutionDaoContainer dataflowTaskExecutionDaoContainer, DataflowJobExecutionDaoContainer dataflowJobExecutionDaoContainer, DataflowTaskExecutionMetadataDaoContainer dataflowTaskExecutionMetadataDaoContainer, SchedulerService schedulerService, SchemaService schemaService, TaskConfigurationProperties taskConfigurationProperties, DataSource dataSource)
@Transactional
public void cleanupExecution(long id,
String schemaTarget)
TaskDeleteServicecleanupExecution in interface TaskDeleteServiceid - the execution id@Transactional public void cleanupExecutions(Set<TaskExecutionControllerDeleteAction> actionsAsSet, String taskName, boolean completed)
TaskDeleteServicecleanupExecutions in interface TaskDeleteServiceactionsAsSet - 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)
TaskDeleteServicecleanupExecutions in interface TaskDeleteServiceactionsAsSet - 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)
TaskDeleteServicecleanupExecutions in interface TaskDeleteServiceactionsAsSet - the actionsids - the id's@Transactional public void deleteTaskExecutions(Set<Long> taskExecutionIds, String schemaTarget)
TaskDeleteServicedeleteTaskExecutions in interface TaskDeleteServicetaskExecutionIds - Collection of task execution ids to delete. Must contain at least 1 id.public void deleteTaskExecutions(String taskName, boolean onlyCompleted)
TaskDeleteServicedeleteTaskExecutions in interface TaskDeleteServicetaskName - the name of the task executionsonlyCompleted - indicator to delete only completed taskspublic void deleteTaskDefinition(String name)
TaskDeleteServicedeleteTaskDefinition in interface TaskDeleteServicename - The name of the task.public void deleteTaskDefinition(String name, boolean cleanup)
TaskDeleteServicedeleteTaskDefinition in interface TaskDeleteServicename - The name of the task.cleanup - the flag to indicate the cleanup of the task executions for the task definition.public void deleteAll()
TaskDeleteServicedeleteAll in interface TaskDeleteServiceCopyright © 2024 Pivotal Software, Inc.. All rights reserved.