public interface WanReplicationEndpoint
extends com.hazelcast.wan.WanReplicationPublisher
| Modifier and Type | Method and Description |
|---|---|
void |
addCacheQueue(String name,
int partitionId,
WanReplicationEventQueue eventQueue)
Publishes all events from the
eventQueue to the WAN queue for
the given partition ID and cache name. |
void |
addMapQueue(String name,
int partitionId,
WanReplicationEventQueue eventQueue)
Publishes all events from the
eventQueue to the WAN queue for
the given partition ID and map name. |
void |
clearQueues()
Clears the WAN queues and recalculates the WAN queue sizes.
|
void |
collectAllServiceNamespaces(com.hazelcast.spi.PartitionReplicationEvent event,
Set<com.hazelcast.spi.ServiceNamespace> namespaces)
Collect the namespaces of all queues that should be replicated by the replication event.
|
void |
collectReplicationData(String wanReplicationName,
com.hazelcast.spi.PartitionReplicationEvent event,
Collection<com.hazelcast.spi.ServiceNamespace> namespaces,
EWRMigrationContainer migrationDataContainer)
Collect all replication data for the specific replication event and
collection of namespaces being replicated.
|
PublisherQueueContainer |
getPublisherQueueContainer()
Returns the WAN event queue container for this publisher.
|
com.hazelcast.monitor.LocalWanPublisherStats |
getStats()
Gathers statistics of related
WanReplicationEndpoint instance. |
void |
init(com.hazelcast.instance.Node node,
com.hazelcast.config.WanReplicationConfig wanReplicationConfig,
com.hazelcast.config.WanPublisherConfig wanPublisherConfig)
Initializes the endpoint using the given arguments.
|
void |
pause()
Calls to this method will pause WAN event queue polling.
|
void |
publishSyncEvent(WanSyncEvent syncRequest)
Publishes a WAN sync event for all or a specific map and for all or
some partitions.
|
void |
putBackup(com.hazelcast.wan.WanReplicationEvent wanReplicationEvent)
Puts the given
wanReplicationEvent in the corresponding WAN backup
queue. |
void |
removeBackup(com.hazelcast.wan.WanReplicationEvent wanReplicationEvent)
Remove the oldest replication event from the replication queue and
decrease the backup event count.
|
void |
resume()
This method re-enables WAN event queue polling for a paused or stopped
WanReplicationEndpoint instance. |
void |
shutdown()
Signals the publisher to shut down and clean up its resources.
|
void |
stop()
Calls to this method will stop WAN replication.
|
void init(com.hazelcast.instance.Node node,
com.hazelcast.config.WanReplicationConfig wanReplicationConfig,
com.hazelcast.config.WanPublisherConfig wanPublisherConfig)
node - the current node that tries to connectwanReplicationConfig - the replication configwanPublisherConfig - this endpoint will be initialized using
this WanPublisherConfig instancevoid shutdown()
void removeBackup(com.hazelcast.wan.WanReplicationEvent wanReplicationEvent)
wanReplicationEvent.wanReplicationEvent - the completed wan eventvoid putBackup(com.hazelcast.wan.WanReplicationEvent wanReplicationEvent)
wanReplicationEvent in the corresponding WAN backup
queue.wanReplicationEvent - the WAN eventPublisherQueueContainer getPublisherQueueContainer()
void addMapQueue(String name, int partitionId, WanReplicationEventQueue eventQueue)
eventQueue to the WAN queue for
the given partition ID and map name.name - the name of the map to which to publish topartitionId - the partition to which to publish toeventQueue - the event queue from which events are publishedvoid addCacheQueue(String name, int partitionId, WanReplicationEventQueue eventQueue)
eventQueue to the WAN queue for
the given partition ID and cache name.name - the name of the cache to which to publish topartitionId - the partition to which to publish toeventQueue - the event queue from which events are publishedvoid pause()
WanReplicationEndpoint instance.
WAN events will still be offered to WAN replication queues but they won't be polled. This means that the queues might eventually fill up and start dropping events.
Calling this method on already paused WanReplicationEndpoint
instances will have no effect.
resume()void stop()
pause() method, an endpoint which is stopped
will not enqueue events. This method will not clear the WAN queues, though.
This means that once this method returns, there might still be some WAN
events enqueued but these events will not be replicated until the publisher
is resumed.
Calling this method on already stopped WanReplicationEndpoint
instances will have no effect.
resume()void resume()
WanReplicationEndpoint instance.
Calling this method on already running WanReplicationEndpoint
instances will have no effect.
com.hazelcast.monitor.LocalWanPublisherStats getStats()
WanReplicationEndpoint instance. This method will always return the
same instance.LocalWanPublisherStatsvoid publishSyncEvent(WanSyncEvent syncRequest)
syncRequest - the WAN sync requestvoid clearQueues()
void collectReplicationData(String wanReplicationName, com.hazelcast.spi.PartitionReplicationEvent event, Collection<com.hazelcast.spi.ServiceNamespace> namespaces, EWRMigrationContainer migrationDataContainer)
wanReplicationName - the WAN replication name in the hazelcast
configuration for this endpointevent - the replication eventnamespaces - the object namespaces which are being
replicatedmigrationDataContainer - the container for the migration datavoid collectAllServiceNamespaces(com.hazelcast.spi.PartitionReplicationEvent event,
Set<com.hazelcast.spi.ServiceNamespace> namespaces)
event - the replication eventnamespaces - the set in which namespaces should be addedCopyright © 2020 Hazelcast, Inc.. All Rights Reserved.