org.apache.ignite.internal.processors.cache.persistence.metastorage.pendingtask

## Interface DurableBackgroundTask<R>

Type Parameters:
  `R` - Type of the result of the task.

All Superinterfaces:
  Serializable

All Known Implementing Classes:
  DurableBackgroundCleanupIndexTreeTask, DurableBackgroundCleanupIndexTreeTaskV2

    public interface DurableBackgroundTask<R>
    extends Serializable

Durable task that should be used to do long operations (e.g. index deletion) in background.

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`void` `cancel()` Canceling the task.
`default DurableBackgroundTask<?>` `convertAfterRestoreIfNeeded()` Converting the current task to another after restoring from metaStorage.
`IgniteInternalFuture<DurableBackgroundTaskResult<R>>` `executeAsync(GridKernalContext ctx)` Asynchronous task execution.
`String` `name()` Getting the name of the task to identify it.

### Method Detail

#### name

    String name()

Getting the name of the task to identify it. Also used as part of a key for storage in a MetaStorage.

Returns:
  Task name.

#### cancel

    void cancel()

Canceling the task.

#### executeAsync

    IgniteInternalFuture<DurableBackgroundTaskResult<R>> executeAsync(GridKernalContext ctx)

Asynchronous task execution. Completion of the task execution should be only with the `result`.

Parameters:
  `ctx` - Kernal context.
Returns:
  Future of the tasks.

#### convertAfterRestoreIfNeeded

    default DurableBackgroundTask<?> convertAfterRestoreIfNeeded()

Converting the current task to another after restoring from metaStorage.

Returns:
  Converted task.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.14.0
Release Date | : September 29 2022