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

## Class SnapshotHandlerRestoreTask

- java.lang.Object
- - org.apache.ignite.compute.ComputeTaskAdapter<SnapshotPartitionsVerifyTaskArg,SnapshotPartitionsVerifyTaskResult>
  - - org.apache.ignite.internal.processors.cache.persistence.snapshot.AbstractSnapshotVerificationTask
    - - org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotHandlerRestoreTask

All Implemented Interfaces:
  Serializable, ComputeTask<SnapshotPartitionsVerifyTaskArg,SnapshotPartitionsVerifyTaskResult>

    public class SnapshotHandlerRestoreTask
    extends AbstractSnapshotVerificationTask

Snapshot restore operation handling task.

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.cache.persistence.snapshot.AbstractSnapshotVerificationTask

`ignite, metas`

### Constructor Summary

Constructors
Constructor and Description
`SnapshotHandlerRestoreTask()`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected ComputeJob` `createJob(String name, @Nullable String path, String constId, Collection<String> groups)`
`@Nullable SnapshotPartitionsVerifyTaskResult` `reduce(List<ComputeJobResult> results)` Reduces (or aggregates) results received so far into one compound result to be returned to caller via `ComputeTaskFuture.get()` method.

### Methods inherited from class org.apache.ignite.internal.processors.cache.persistence.snapshot.AbstractSnapshotVerificationTask

`checkMissedMetadata, map, result`

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

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

### Constructor Detail

#### SnapshotHandlerRestoreTask

    public SnapshotHandlerRestoreTask()

### Method Detail

#### createJob

    protected ComputeJob createJob(String name,
                                   @Nullable
                                   @Nullable String path,
                                   String constId,
                                   Collection<String> groups)

Specified by:
  `createJob` in class `AbstractSnapshotVerificationTask`
Parameters:
  `name` - Snapshot name.
  `path` - Snapshot directory path.
  `constId` - Snapshot metadata file name.
  `groups` - Cache groups to be restored from the snapshot. May be empty if all cache groups are being restored.
Returns:
  Compute job.

#### reduce

    @Nullable
    public @Nullable SnapshotPartitionsVerifyTaskResult reduce(List<ComputeJobResult> results)

Reduces (or aggregates) results received so far into one compound result to be returned to caller via `ComputeTaskFuture.get()` method.

Note, that if some jobs did not succeed and could not be failed over then the list of results passed into this method will include the failed results. Otherwise, failed results will not be in the list.

Parameters:
  `results` - Received results of broadcasted remote executions. Note that if task class has `ComputeTaskNoResultCache` annotation, then this list will be empty.
Returns:
  Grid job result constructed from results of remote executions.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.14.0
Release Date | : September 29 2022