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

## Class SnapshotPartitionsQuickVerifyHandler

- java.lang.Object
- - org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsVerifyHandler
  - - org.apache.ignite.internal.processors.cache.persistence.snapshot.SnapshotPartitionsQuickVerifyHandler

All Implemented Interfaces:
  `SnapshotHandler<Map<PartitionKeyV2,​PartitionHashRecordV2>>`, `Extension`

    public class SnapshotPartitionsQuickVerifyHandler
    extends SnapshotPartitionsVerifyHandler

Quick partitions verifier. Warns if partiton counters or size are different among the nodes what can be caused by canceled/failed DataStreamer. Skips checking if the DataStreamer warning is detected.

### Field Summary

Fields
`static String` `WRN_MSG`

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

`cctx`

### Constructor Summary

Constructors
`SnapshotPartitionsQuickVerifyHandler​(GridCacheSharedContext<?,​?> cctx)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `complete​(String name, Collection<SnapshotHandlerResult<Map<PartitionKeyV2,​PartitionHashRecordV2>>> results)` Processing the results of the `SnapshotHandler.invoke(SnapshotHandlerContext)` method received from all nodes.
`Map<PartitionKeyV2,​PartitionHashRecordV2>` `invoke​(SnapshotHandlerContext opCtx)` Local processing of a snapshot operation.
`protected boolean` `skipHash()` Provides flag of full hash calculation.
`SnapshotHandlerType` `type()` Snapshot handler type.

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

`isPunchHoleEnabled`

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

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

### Field Detail

#### WRN_MSG

    public static final String WRN_MSG

See Also:
  Constant Field Values

### Constructor Detail

#### SnapshotPartitionsQuickVerifyHandler

    public SnapshotPartitionsQuickVerifyHandler​(GridCacheSharedContext<?,​?> cctx)

Parameters:
  `cctx` - Shared context.

### Method Detail

#### type

    public SnapshotHandlerType type()

Snapshot handler type.

Specified by:
  `type` in interface `SnapshotHandler<Map<PartitionKeyV2,​PartitionHashRecordV2>>`
Overrides:
  `type` in class `SnapshotPartitionsVerifyHandler`

#### invoke

    public Map<PartitionKeyV2,​PartitionHashRecordV2> invoke​(SnapshotHandlerContext opCtx)
                                                           throws IgniteCheckedException

Local processing of a snapshot operation. Called on every node that contains snapshot data.

Specified by:
  `invoke` in interface `SnapshotHandler<Map<PartitionKeyV2,​PartitionHashRecordV2>>`
Overrides:
  `invoke` in class `SnapshotPartitionsVerifyHandler`
Parameters:
  `opCtx` - Snapshot handler context.
Returns:
  Result of local processing. This result will be returned in `SnapshotHandlerResult.data()` method passed into `SnapshotHandler.complete(String, Collection)` handler method.
Throws:
  `IgniteCheckedException`

#### complete

    public void complete​(String name,
                         Collection<SnapshotHandlerResult<Map<PartitionKeyV2,​PartitionHashRecordV2>>> results)
                  throws IgniteCheckedException

Processing the results of the `SnapshotHandler.invoke(SnapshotHandlerContext)` method received from all nodes. This method is called on coordinator node for `SnapshotHandlerType.CREATE` handler type and on the random node containing the snapshot data for `SnapshotHandlerType.RESTORE`.

Note: If this method fails, the entire cluster-wide snapshot operation will be aborted and the changes made by it will be rolled back.

Specified by:
  `complete` in interface `SnapshotHandler<Map<PartitionKeyV2,​PartitionHashRecordV2>>`
Overrides:
  `complete` in class `SnapshotPartitionsVerifyHandler`
Parameters:
  `name` - Snapshot name.
  `results` - Results from all nodes.
Throws:
  `SnapshotWarningException` - If a warning of snapshot operation occurred.
  `IgniteCheckedException`
See Also:
  `SnapshotHandlerResult`

#### skipHash

    protected boolean skipHash()

Provides flag of full hash calculation.

Overrides:
  `skipHash` in class `SnapshotPartitionsVerifyHandler`
Returns:
  `True` if full partition hash calculation is required. `False` otherwise.