public class WanBatchReplication extends AbstractWanReplication implements Runnable, com.hazelcast.spi.LiveOperationsTracker
The event count is configurable by
WanReplicationProperties.BATCH_SIZE and is
by default.
The elapsed time is configurable by
WanReplicationProperties.BATCH_MAX_DELAY_MILLIS and is
by default.
The events are sent to the endpoints depending on the event key
partition.
NOTE
The WAN batch collection mechanism needs to be run by one thread only
for a single publisher.
| Modifier and Type | Field and Description |
|---|---|
static String |
WAN_BATCH_SENDER_CLASS
JVM argument for changing the implementation of the base implementation
for the
WanBatchSender. |
static String |
WAN_EXECUTOR
Executor name for WAN replication tasks, e.g.
|
connectionManagerconfigurationContext, eventQueueContainer, lastQueueFullLogTimeMs, localGroupName, logger, node, queueCapacity, queueFullBehavior, queueLoggerTimePeriodMs, running, state, syncSupport, wanCounter, wanPublisherId, wanReplicationName| Constructor and Description |
|---|
WanBatchReplication() |
| Modifier and Type | Method and Description |
|---|---|
protected WanPublisherSyncSupport |
createWanSyncSupport()
Creates the instance implementing WAN sync features.
|
long |
getFailedTransmissionCount()
Returns the number of failed WAN batch transmissions.
|
BatchReplicationStrategy |
getReplicationStrategy() |
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 |
populate(com.hazelcast.spi.LiveOperations liveOperations) |
void |
publishAntiEntropyEvent(WanAntiEntropyEvent event)
Publishes an anti-entropy event.
|
void |
run() |
afterShutdown, getTargetEndpoints, isConnectedaddCacheQueue, addMapQueue, checkWanReplicationQueues, clearQueues, collectAllServiceNamespaces, collectReplicationData, decrementCounter, destroyMapData, getCurrentBackupElementCount, getCurrentElementCount, getPartitionId, getPublisherQueueContainer, getStats, onMigrationCommit, onMigrationRollback, onMigrationStart, onWanQueueClearedDuringMigration, pause, publishReplicationEvent, publishReplicationEvent, publishReplicationEventBackup, publishSyncEvent, putBackup, removeBackup, removeBackups, removeReplicationEvent, reset, resume, shutdown, stoppublic static final String WAN_BATCH_SENDER_CLASS
WanBatchSender.
Intended for testing and benchmarking, e.g. where the target cluster can
be mocked by generating responses after a configurable latency.public static final String WAN_EXECUTOR
public void init(com.hazelcast.instance.Node node,
com.hazelcast.config.WanReplicationConfig wanReplicationConfig,
com.hazelcast.config.WanPublisherConfig wanPublisherConfig)
WanReplicationEndpointinit in interface WanReplicationEndpointinit in class AbstractWanReplicationnode - the current node that tries to connectwanReplicationConfig - the replication configwanPublisherConfig - this endpoint will be initialized using
this WanPublisherConfig instanceprotected WanPublisherSyncSupport createWanSyncSupport()
AbstractWanPublishernull.createWanSyncSupport in class AbstractWanPublisherpublic void publishAntiEntropyEvent(WanAntiEntropyEvent event)
publishAntiEntropyEvent in class AbstractWanPublisherevent - the WAN anti-entropy eventpublic void populate(com.hazelcast.spi.LiveOperations liveOperations)
populate in interface com.hazelcast.spi.LiveOperationsTrackerpublic long getFailedTransmissionCount()
public BatchReplicationStrategy getReplicationStrategy()
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.