org.springframework.cloud.dataflow.server.service

## Interface TaskDeleteService

- All Known Implementing Classes:
    DefaultTaskDeleteService

      public interface TaskDeleteService

  Provides task deletion services.
  Author:
    Daniel Serleg, Gunnar Hillert, Ilayaperumal Gopinathan

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cleanupExecution(long id)` Cleanup the resources that resulted from running the task with the given execution id.
    `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` | `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> ids)` Delete one or more Task executions.

- - ### Method Detail

    - #### 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

          void cleanupExecutions(Set<TaskExecutionControllerDeleteAction> actionsAsSet,
                                 Set<Long> ids)

      Cleanup the resources that resulted from running the task with the given execution ids and actions.
      Parameters:
        `actionsAsSet` - the actions
        `ids` - the id's

    - #### deleteTaskExecutions

          void deleteTaskExecutions(Set<Long> ids)

      Delete one or more Task executions.
      Parameters:
        `ids` - Collection of task execution ids to delete. Must contain at least 1 id.

    - #### deleteTaskDefinition

          void deleteTaskDefinition(String name)

      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

          void deleteTaskDefinition(String name,
                                    boolean cleanup)

      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.

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.