Class DurableBackgroundTaskResult<R>
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.metastorage.pendingtask.DurableBackgroundTaskResult<R>
-
- Type Parameters:
R- Type of the result of the task.
public class DurableBackgroundTaskResult<R> extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <R> DurableBackgroundTaskResult<R>complete()Creation of a completed task execution result that does not require restarting it.static <R> DurableBackgroundTaskResult<R>complete(@Nullable Throwable err)Creation of a completed task execution result that does not require restarting it.static <R> DurableBackgroundTaskResult<R>complete(R res)Creation of a completed task execution result that does not require restarting it.booleancompleted()Checking the completion of the task.@Nullable Throwableerror()Getting a task execution error.booleanrestart()Checking if the task needs to be restarted.static <R> DurableBackgroundTaskResult<R>restart(@Nullable Throwable err)Creation of a task execution result that requires its restart.Rresult()Getting the result of the task.StringtoString()
-
-
-
Method Detail
-
complete
public static <R> DurableBackgroundTaskResult<R> complete(@Nullable @Nullable Throwable err)
Creation of a completed task execution result that does not require restarting it.- Parameters:
err- An error occurred while executing the task.- Returns:
- Result of executing a durable background task.
-
complete
public static <R> DurableBackgroundTaskResult<R> complete(@Nullable R res)
Creation of a completed task execution result that does not require restarting it.- Parameters:
res- Result of the task.- Returns:
- Result of executing a durable background task.
-
complete
public static <R> DurableBackgroundTaskResult<R> complete()
Creation of a completed task execution result that does not require restarting it.- Returns:
- Result of executing a durable background task.
-
restart
public static <R> DurableBackgroundTaskResult<R> restart(@Nullable @Nullable Throwable err)
Creation of a task execution result that requires its restart.- Parameters:
err- An error occurred while executing the task.- Returns:
- Result of executing a durable background task.
-
completed
public boolean completed()
Checking the completion of the task.- Returns:
Trueif completed.
-
restart
public boolean restart()
Checking if the task needs to be restarted.- Returns:
Trueif the task needs to be restarted.
-
error
@Nullable public @Nullable Throwable error()
Getting a task execution error.- Returns:
- An error occurred while executing the task.
-
result
@Nullable public R result()
Getting the result of the task.- Returns:
- Result of the task.
-
-