Class WanReplicationHandler
java.lang.Object
com.loomcache.server.wan.WanReplicationHandler
Protocol handler for WAN replication messages over the binary protocol.
Handles the following message types:
WAN_SYNC— Exchange Merkle trees and enqueue delta sync to a target clusterWAN_BATCH— Receive a batch of replication eventsWAN_ACK— Process acknowledgment from a remote publisherWAN_STATUS— Query replication statisticsWAN_PAUSE— Pause replication to a targetWAN_RESUME— Resume replication to a target
Message Format:
mapName— target cluster ID for PAUSE/RESUME/STATUS, source cluster ID for BATCH/ACKvalue— serialized batch payload (WAN_BATCH), ack sequence (WAN_ACK)key— endpoint address for WAN_SYNC
- Since:
- 2.0
-
Constructor Summary
ConstructorsConstructorDescriptionWanReplicationHandler(@NonNull WanReplicationManager manager, int instanceNumber) Create a WAN replication handler. -
Method Summary
Modifier and TypeMethodDescription@Nullable MessageHandle a WAN replication protocol message.static booleanisWanOperation(@Nullable MessageType type) Check whether a message type is a WAN replication operation.
-
Constructor Details
-
WanReplicationHandler
Create a WAN replication handler.- Parameters:
manager- the WAN replication managerinstanceNumber- the node instance number for logging
-
-
Method Details
-
handle
-
isWanOperation
Check whether a message type is a WAN replication operation.- Parameters:
type- the message type to check- Returns:
- true if the type is a WAN operation
-