public class WanReplicationServiceImpl extends Object implements WanReplicationService
WanReplicationServiceSERVICE_NAME| Constructor and Description |
|---|
WanReplicationServiceImpl(Node node) |
| Modifier and Type | Method and Description |
|---|---|
AddWanConfigResult |
addWanReplicationConfig(WanReplicationConfig wanConfig)
Adds a new
WanReplicationConfig to the cluster. |
void |
addWanReplicationConfigLocally(WanReplicationConfig wanConfig)
Adds a new
WanReplicationConfig to this member and creates the
WanReplicationPublishers specified in the config. |
void |
checkWanReplicationQueues(String name) |
void |
clearQueues(String wanReplicationName,
String targetGroupName)
Clears WAN replication queues of the given wanReplicationName for the given target.
|
void |
consistencyCheck(String wanReplicationName,
String targetGroupName,
String mapName)
Initiate WAN consistency check for a specific map.
|
DistributedServiceWanEventCounters |
getReceivedEventCounters(String serviceName)
Returns a counter of received and processed WAN replication events.
|
DistributedServiceWanEventCounters |
getSentEventCounters(String wanReplicationName,
String targetGroupName,
String serviceName)
Returns a counter of sent and processed WAN replication events.
|
Map<String,LocalWanStats> |
getStats()
Return the service statistics for the local instance.
|
WanReplicationPublisher |
getWanReplicationPublisher(String name)
Creates a new
WanReplicationPublisher by the given name. |
WanSyncState |
getWanSyncState()
Returns current status of WAN sync operation or
null when there
is no status. |
void |
pause(String wanReplicationName,
String targetGroupName)
Pauses WAN replication for the given
wanReplicationName and
targetGroupName on this hazelcast instance. |
void |
removeWanEventCounters(String serviceName,
String objectName)
Removes all WAN event counters for the given
serviceName and
dataStructureName. |
void |
resume(String wanReplicationName,
String targetGroupName)
Resumes WAN replication for the given
wanReplicationName and
targetGroupName on this hazelcast instance. |
void |
shutdown()
Starts the shutdown process of the WAN replication service.
|
void |
stop(String wanReplicationName,
String targetGroupName)
Stops WAN replication for the given
wanReplicationName and
targetGroupName on this hazelcast instance. |
void |
syncAllMaps(String wanReplicationName,
String targetGroupName)
Initiate wan sync for all maps.
|
void |
syncMap(String wanReplicationName,
String targetGroupName,
String mapName)
Initiate wan sync for a specific map.
|
public WanReplicationServiceImpl(Node node)
public WanReplicationPublisher getWanReplicationPublisher(String name)
WanReplicationServiceWanReplicationPublisher by the given name. If
the name already exists, returns the previous instance.getWanReplicationPublisher in interface WanReplicationServicename - name of the WAN replication configurationpublic void shutdown()
WanReplicationServiceshutdown in interface WanReplicationServicepublic void pause(String wanReplicationName, String targetGroupName)
WanReplicationServicewanReplicationName and
targetGroupName on this hazelcast instance.pause in interface WanReplicationServicewanReplicationName - name of WAN replication configurationtargetGroupName - WAN target cluster group namepublic void stop(String wanReplicationName, String targetGroupName)
WanReplicationServicewanReplicationName and
targetGroupName on this hazelcast instance.stop in interface WanReplicationServicewanReplicationName - name of WAN replication configurationtargetGroupName - WAN target cluster group namepublic void resume(String wanReplicationName, String targetGroupName)
WanReplicationServicewanReplicationName and
targetGroupName on this hazelcast instance.resume in interface WanReplicationServicewanReplicationName - name of WAN replication configurationtargetGroupName - WAN target cluster group namepublic void checkWanReplicationQueues(String name)
checkWanReplicationQueues in interface WanReplicationServicepublic void syncMap(String wanReplicationName, String targetGroupName, String mapName)
WanReplicationServicesyncMap in interface WanReplicationServicewanReplicationName - the name of the wan replication configtargetGroupName - the group name on the target clustermapName - the map namepublic void syncAllMaps(String wanReplicationName, String targetGroupName)
WanReplicationServicesyncAllMaps in interface WanReplicationServicewanReplicationName - the name of the wan replication configtargetGroupName - the group name on the target clusterpublic void consistencyCheck(String wanReplicationName, String targetGroupName, String mapName)
WanReplicationServiceconsistencyCheck in interface WanReplicationServicewanReplicationName - the name of the wan replication configtargetGroupName - the group name on the target clustermapName - the map namepublic void clearQueues(String wanReplicationName, String targetGroupName)
WanReplicationServiceclearQueues in interface WanReplicationServicewanReplicationName - the name of the wan replication configtargetGroupName - the target cluster group namepublic AddWanConfigResult addWanReplicationConfig(WanReplicationConfig wanConfig)
WanReplicationServiceWanReplicationConfig to the cluster.
This method can also accept WAN configs with an existing WAN replication
name. Such configs will be merged into the existing WAN replication
config by adding publishers with publisher IDs which are not already part
of the existing configuration.
The return value is a best-effort guess at the result of adding WAN
replication config based on the existing local WAN replication config.
An exact result is difficult to calculate since not all members might
have the same existing configuration and there might be a concurrent
request to add overlapping WAN replication config.addWanReplicationConfig in interface WanReplicationServicewanConfig - the WAN replication config to addWanReplicationService.addWanReplicationConfigLocally(WanReplicationConfig)public void addWanReplicationConfigLocally(WanReplicationConfig wanConfig)
WanReplicationServiceWanReplicationConfig to this member and creates the
WanReplicationPublishers specified in the config.
This method can also accept WAN configs with an existing WAN replication
name. Such configs will be merged into the existing WAN replication
config by adding publishers with publisher IDs which are not already part
of the existing configuration.addWanReplicationConfigLocally in interface WanReplicationServicepublic Map<String,LocalWanStats> getStats()
StatisticsAwareServicegetStats in interface StatisticsAwareService<LocalWanStats>public WanSyncState getWanSyncState()
WanReplicationServicenull when there
is no status.getWanSyncState in interface WanReplicationServicepublic DistributedServiceWanEventCounters getReceivedEventCounters(String serviceName)
WanReplicationServicegetReceivedEventCounters in interface WanReplicationServiceserviceName - the name of the service for the WAN eventspublic DistributedServiceWanEventCounters getSentEventCounters(String wanReplicationName, String targetGroupName, String serviceName)
WanReplicationServicegetSentEventCounters in interface WanReplicationServicewanReplicationName - the name of the wan replication configtargetGroupName - the target cluster group nameserviceName - the name of the service for the WAN eventspublic void removeWanEventCounters(String serviceName, String objectName)
WanReplicationServiceserviceName and
dataStructureName.removeWanEventCounters in interface WanReplicationServiceserviceName - the name of the service for the WAN eventsobjectName - the distributed object nameCopyright © 2020 Hazelcast, Inc.. All Rights Reserved.