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

## Class DataStreamerUpdatesHandler

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

All Implemented Interfaces:
  SnapshotHandler<Boolean>, Extension

    public class DataStreamerUpdatesHandler
    extends Object
    implements SnapshotHandler<Boolean>

A snapshot haldler that monitors and warns of inconsistent by nature updates from DataStreamer which can issue data inconsistency in snapshot.

### Field Summary

Fields
`static String` `WRN_MSG`

### Constructor Summary

Constructors
Constructor and Description
`DataStreamerUpdatesHandler()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `complete(String name, Collection<SnapshotHandlerResult<Boolean>> results)` Processing the results of the `SnapshotHandler.invoke(SnapshotHandlerContext)` method received from all nodes.
`Boolean` `invoke(SnapshotHandlerContext ctx)` Local processing of a snapshot operation.
`SnapshotHandlerType` `type()` Snapshot handler type.

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

#### DataStreamerUpdatesHandler

    public DataStreamerUpdatesHandler()

### Method Detail

#### type

    public SnapshotHandlerType type()

Snapshot handler type.

Specified by:
  `type` in interface `SnapshotHandler<Boolean>`

#### invoke

    public Boolean invoke(SnapshotHandlerContext ctx)

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

Specified by:
  `invoke` in interface `SnapshotHandler<Boolean>`
Parameters:
  `ctx` - 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.

#### complete

    public void complete(String name,
                         Collection<SnapshotHandlerResult<Boolean>> results)
                  throws SnapshotWarningException

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<Boolean>`
Parameters:
  `name` - Snapshot name.
  `results` - Results from all nodes.
Throws:
  `SnapshotWarningException` - If a warning of snapshot operation occurred.
See Also:
  `SnapshotHandlerResult`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

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