Class AbstractCreateSnapshotFutureTask

    • Constructor Detail

      • AbstractCreateSnapshotFutureTask

        protected AbstractCreateSnapshotFutureTask​(GridCacheSharedContext<?,​?> cctx,
                                                   UUID srcNodeId,
                                                   UUID reqId,
                                                   String snpName,
                                                   SnapshotSender snpSndr,
                                                   Map<Integer,​Set<Integer>> parts)
        Parameters:
        cctx - Shared context.
        srcNodeId - Node id which cause snapshot task creation.
        reqId - Snapshot operation request ID.
        snpName - Snapshot name.
        snpSndr - Factory which produces snapshot sender instance.
        parts - Partitions to be processed.
    • Method Detail

      • cancel

        public boolean cancel()
        Default no-op implementation that always returns false. Futures that do support cancellation should override this method and call GridFutureAdapter.onCancelled() callback explicitly if cancellation indeed did happen.
        Specified by:
        cancel in interface IgniteInternalFuture<SnapshotFutureTaskResult>
        Returns:
        True if future was canceled (i.e. was not finished prior to this call).
      • closeAsync

        protected abstract CompletableFuture<Void> closeAsync()
        Returns:
        Future which will be completed when operations truly stopped.
      • stopping

        protected boolean stopping()
        Returns:
        true if current task requested to be stopped.
      • saveSnapshotData

        protected void saveSnapshotData()
        Starts async execution of all tasks required to create snapshot.
      • acceptException

        public void acceptException​(Throwable th)
        Parameters:
        th - An exception which occurred during snapshot processing.
      • snapshotName

        public String snapshotName()
        Returns:
        Snapshot name.
      • sourceNodeId

        public UUID sourceNodeId()
        Returns:
        Node id which triggers this operation.
      • requestId

        public UUID requestId()
        Returns:
        Snapshot operation request ID.
      • affectedCacheGroups

        public Set<Integer> affectedCacheGroups()
        Returns:
        Set of cache groups included into snapshot operation.
      • start

        public abstract boolean start()
        Initiates snapshot task.
        Returns:
        true if task started by this call.