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.
-
-
Constructor Summary
Constructors Constructor Description DataStreamerUpdatesHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomplete(String name, Collection<SnapshotHandlerResult<Boolean>> results)Processing the results of theSnapshotHandler.invoke(SnapshotHandlerContext)method received from all nodes.Booleaninvoke(SnapshotHandlerContext ctx)Local processing of a snapshot operation.SnapshotHandlerTypetype()Snapshot handler type.
-
-
-
Field Detail
-
WRN_MSG
public static final String WRN_MSG
- See Also:
- Constant Field Values
-
-
Method Detail
-
type
public SnapshotHandlerType type()
Snapshot handler type.- Specified by:
typein interfaceSnapshotHandler<Boolean>
-
invoke
public Boolean invoke(SnapshotHandlerContext ctx)
Local processing of a snapshot operation. Called on every node that contains snapshot data.- Specified by:
invokein interfaceSnapshotHandler<Boolean>- Parameters:
ctx- Snapshot handler context.- Returns:
- Result of local processing. This result will be returned in
SnapshotHandlerResult.data()method passed intoSnapshotHandler.complete(String, Collection)handler method.
-
complete
public void complete(String name, Collection<SnapshotHandlerResult<Boolean>> results) throws SnapshotWarningException
Processing the results of theSnapshotHandler.invoke(SnapshotHandlerContext)method received from all nodes. This method is called on coordinator node forSnapshotHandlerType.CREATEhandler type and on the random node containing the snapshot data forSnapshotHandlerType.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:
completein interfaceSnapshotHandler<Boolean>- Parameters:
name- Snapshot name.results- Results from all nodes.- Throws:
SnapshotWarningException- If a warning of snapshot operation occurred.- See Also:
SnapshotHandlerResult
-
-