public class WanReplicationConfig extends Object implements IdentifiedDataSerializable
WanBatchPublisherConfig
or a WanCustomPublisherConfig
.
A single WAN replication configuration may consist of several WAN publisher
configurations. The built-in WAN publisher implementation should be
configured using WanBatchPublisherConfig
and custom
WAN publisher implementations can be configured using
WanCustomPublisherConfig
.
You may consider each WAN publisher configuration as a single target cluster or a single external system. The WAN subsystem will track replication for each publisher separately. Having multiple publishers in a single WAN replication config simplifies simultaneous publication of map and cache events to multiple target systems.
In addition to defining publishers, you may optionally configure a WAN consumer. The WAN consumer is in charge of consuming (processing) incoming WAN events. Usually when defining a custom consumer you need to define a custom WAN publisher as well.
Constructor and Description |
---|
WanReplicationConfig() |
Modifier and Type | Method and Description |
---|---|
WanReplicationConfig |
addBatchReplicationPublisherConfig(WanBatchPublisherConfig config)
Adds a WAN publisher configuration using the built-in batching WAN
implementation to this WAN replication.
|
WanReplicationConfig |
addCustomPublisherConfig(WanCustomPublisherConfig config)
Adds a custom WAN publisher implementation configuration to this WAN
replication.
|
boolean |
equals(Object o) |
List<WanBatchPublisherConfig> |
getBatchPublisherConfigs()
Returns the list of WAN publisher configurations using the built-in
batching WAN implementation for this WAN replication.
|
int |
getClassId()
Returns type identifier for this class.
|
WanConsumerConfig |
getConsumerConfig()
Returns the
WAN consumer configuration for this
WAN replication. |
List<WanCustomPublisherConfig> |
getCustomPublisherConfigs()
Returns the list of custom WAN publisher implementations for this WAN
replication.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
String |
getName() |
int |
hashCode() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
WanReplicationConfig |
setBatchPublisherConfigs(List<WanBatchPublisherConfig> batchPublisherConfigs)
Sets the list of WAN publisher configurations using the built-in
batching WAN implementation for this WAN replication.
|
WanReplicationConfig |
setConsumerConfig(WanConsumerConfig consumerConfig)
Sets the
WAN consumer configuration for this
WAN replication. |
WanReplicationConfig |
setCustomPublisherConfigs(List<WanCustomPublisherConfig> customPublisherConfigs)
Sets the list of custom WAN publisher implementations for this WAN
replication.
|
WanReplicationConfig |
setName(String name)
Sets the name of this WAN replication config.
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public String getName()
public WanReplicationConfig setName(@Nonnull String name)
WanReplicationRef
configuration.name
- the WAN replication config nameWanReplicationRef.getName()
public WanConsumerConfig getConsumerConfig()
WAN consumer configuration
for this
WAN replication. The WAN consumer is in charge of consuming (processing)
incoming WAN events.public WanReplicationConfig setConsumerConfig(WanConsumerConfig consumerConfig)
WAN consumer configuration
for this
WAN replication. The WAN consumer is in charge of consuming (processing)
incoming WAN events.consumerConfig
- the WAN consumer configuration@Nonnull public List<WanCustomPublisherConfig> getCustomPublisherConfigs()
public WanReplicationConfig setCustomPublisherConfigs(@Nonnull List<WanCustomPublisherConfig> customPublisherConfigs)
customPublisherConfigs
- publisher configurations@Nonnull public List<WanBatchPublisherConfig> getBatchPublisherConfigs()
public WanReplicationConfig setBatchPublisherConfigs(@Nonnull List<WanBatchPublisherConfig> batchPublisherConfigs)
batchPublisherConfigs
- configurations for the built-in WAN publisher implementationpublic WanReplicationConfig addBatchReplicationPublisherConfig(WanBatchPublisherConfig config)
config
- the WAN publisher configurationpublic WanReplicationConfig addCustomPublisherConfig(WanCustomPublisherConfig config)
config
- the WAN publisher configurationpublic int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getClassId()
IdentifiedDataSerializable
getClassId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2023 Hazelcast, Inc.. All rights reserved.