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 Modifier and Type Method Description voidcancel()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.Stringname()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 theresult.- 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.
-
-