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

## Interface DurableBackgroundTask

All Superinterfaces:
  Serializable

    public interface DurableBackgroundTask
    extends Serializable

Durable task that should be used to do long operations (e.g. index deletion) in background for cases when node with persistence can fail before operation is completed. After start, node reads it's pending background tasks from metastorage and completes them.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `complete()` Method that marks task as complete.
`void` `execute(GridKernalContext ctx)` Method that executes the task.
`boolean` `isCompleted()` Method that return completion flag.
`void` `onCancel()` Callback for task cancellation.
`String` `shortName()` Short unique name of the task is used to build metastorage key for saving this task and for logging.

### Method Detail

#### shortName

    String shortName()

Short unique name of the task is used to build metastorage key for saving this task and for logging.

Returns:
  Short name of this task.

#### execute

    void execute(GridKernalContext ctx)

Method that executes the task. It is called after node start.

Parameters:
  `ctx` - Grid kernal context.

#### complete

    void complete()

Method that marks task as complete.

#### isCompleted

    boolean isCompleted()

Method that return completion flag.

Returns:
  flag that task completed.

#### onCancel

    void onCancel()

Callback for task cancellation.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020