org.apache.ignite.internal.processors.cache.persistence.snapshot

## Class SnapshotResponseRemoteFutureTask

- java.lang.Object
- - org.apache.ignite.internal.util.future.GridFutureAdapter<T>
  - - org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotResponseRemoteFutureTask

All Implemented Interfaces:
  IgniteInternalFuture<Void>

    public class SnapshotResponseRemoteFutureTask
    extends GridFutureAdapter<T>

### Field Summary

Fields
`protected GridCacheSharedContext<?,?>` `cctx` Shared context.
`protected AtomicReference<Throwable>` `err` An exception which has been occurred during snapshot processing.
`protected FileIOFactory` `ioFactory` IO factory which will be used for creating snapshot delta-writers.
`protected IgniteLogger` `log` Ignite logger.
`protected Map<Integer,Set<Integer>>` `parts` Partition to be processed.
`protected UUID` `reqId` Snapshot operation request ID.
`protected String` `snpName` Unique identifier of snapshot process.
`protected org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotSender` `snpSndr` Snapshot data sender.
`protected UUID` `srcNodeId` Node id which cause snapshot operation.
`protected File` `tmpSnpWorkDir` Snapshot working directory on file system.

### Constructor Summary

Constructors
Constructor and Description
`SnapshotResponseRemoteFutureTask(GridCacheSharedContext<?,?> cctx, UUID srcNodeId, UUID reqId, String snpName, String snpPath, File tmpWorkDir, FileIOFactory ioFactory, org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotSender snpSndr, Map<Integer,Set<Integer>> parts)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `acceptException(Throwable th)`
`Set<Integer>` `affectedCacheGroups()`
`boolean` `cancel()` Default no-op implementation that always returns `false`.
`UUID` `requestId()`
`String` `snapshotName()`
`UUID` `sourceNodeId()`
`boolean` `start()` Initiates snapshot task.
`String` `toString()`

### Methods inherited from class org.apache.ignite.internal.util.future.GridFutureAdapter

`chain, chain, chainCompose, chainCompose, error, get, get, get, getUninterruptibly, ignoreInterrupts, isCancelled, isDone, isFailed, listen, logger, onCancelled, onDone, onDone, onDone, onDone, onDone, reset, result`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### cctx

    protected final GridCacheSharedContext<?,?> cctx

Shared context.

#### log

    protected final IgniteLogger log

Ignite logger.

#### srcNodeId

    protected final UUID srcNodeId

Node id which cause snapshot operation.

#### reqId

    protected final UUID reqId

Snapshot operation request ID.

#### snpName

    protected final String snpName

Unique identifier of snapshot process.

#### tmpSnpWorkDir

    protected final File tmpSnpWorkDir

Snapshot working directory on file system.

#### ioFactory

    protected final FileIOFactory ioFactory

IO factory which will be used for creating snapshot delta-writers.

#### snpSndr

    @GridToStringExclude
    protected final org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotSender snpSndr

Snapshot data sender.

#### parts

    protected final Map<Integer,Set<Integer>> parts

Partition to be processed.

#### err

    protected final AtomicReference<Throwable> err

An exception which has been occurred during snapshot processing.

### Constructor Detail

#### SnapshotResponseRemoteFutureTask

    public SnapshotResponseRemoteFutureTask(GridCacheSharedContext<?,?> cctx,
                                            UUID srcNodeId,
                                            UUID reqId,
                                            String snpName,
                                            String snpPath,
                                            File tmpWorkDir,
                                            FileIOFactory ioFactory,
                                            org.apache.ignite.internal.processors.cache.persistence.snapshot.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` - Unique identifier of snapshot process.
  `snpPath` - Snapshot directory path.
  `tmpWorkDir` - Working directory for intermediate snapshot results.
  `ioFactory` - Factory to working with snapshot files.
  `snpSndr` - Factory which produces snapshot receiver instance.
  `parts` - Partition to be processed.

### Method Detail

#### start

    public boolean start()

Initiates snapshot task.

Returns:
  `true` if task started by this call.

#### 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.

#### 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<T>`
Overrides:
  `cancel` in class `GridFutureAdapter<T>`
Returns:
  `True` if future was canceled (i.e. was not finished prior to this call).

#### toString

    public String toString()

Overrides:
  `toString` in class `GridFutureAdapter<T>`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023