Class DurableBackgroundTaskState<R>


  • public class DurableBackgroundTaskState<R>
    extends Object
    Class for storing the current state of a durable background task. Task execution state transitions: INIT -> PREPARE -> STARTED -> COMPLETED If the task needs to be restarted, it must have status INIT.
    • Constructor Detail

      • DurableBackgroundTaskState

        public DurableBackgroundTaskState​(DurableBackgroundTask<R> task,
                                          GridFutureAdapter<R> outFut,
                                          boolean saved,
                                          boolean converted)
        Constructor.
        Parameters:
        task - Durable background task.
        outFut - Outside task future.
        saved - Task has been saved to the MetaStorage.
    • Method Detail

      • task

        public DurableBackgroundTask<R> task()
        Getting durable background task.
        Returns:
        Durable background task.
      • outFuture

        public GridFutureAdapter<R> outFuture()
        Getting outside task future.
        Returns:
        Outside task future.
      • saved

        public boolean saved()
        Check if the task has been saved to the MetaStorage.
        Returns:
        True if stored in the MetaStorage.
      • converted

        public boolean converted()
        Check if the task has been converted from another.
        Returns:
        True if it was converted from another task.