public class WanReplicationConfig extends Object implements IdentifiedDataSerializable
WanPublisherConfig
.
A single WAN replication configuration may consist of several
WAN publisher configurations
.
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 |
addWanPublisherConfig(WanPublisherConfig wanPublisherConfig)
Adds a WAN publisher configuration to this WAN replication.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
String |
getName() |
WanConsumerConfig |
getWanConsumerConfig()
Returns the
WAN consumer configuration for this
WAN replication. |
List<WanPublisherConfig> |
getWanPublisherConfigs()
Returns the list of configured WAN publisher targets for this WAN
replication.
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
WanReplicationConfig |
setName(String name)
Sets the name of this WAN replication config.
|
WanReplicationConfig |
setWanConsumerConfig(WanConsumerConfig wanConsumerConfig)
Sets the
WAN consumer configuration for this
WAN replication. |
void |
setWanPublisherConfigs(List<WanPublisherConfig> wanPublisherConfigs)
Sets the list of configured WAN publisher targets for this WAN replication.
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public String getName()
public WanReplicationConfig setName(String name)
WanReplicationRef
configuration.name
- the WAN replication config nameWanReplicationRef.getName()
public WanConsumerConfig getWanConsumerConfig()
WAN consumer configuration
for this
WAN replication. The WAN consumer is in charge of consuming (processing)
incoming WAN events.public WanReplicationConfig setWanConsumerConfig(WanConsumerConfig wanConsumerConfig)
WAN consumer configuration
for this
WAN replication. The WAN consumer is in charge of consuming (processing)
incoming WAN events.wanConsumerConfig
- the WAN consumer configurationpublic List<WanPublisherConfig> getWanPublisherConfigs()
public void setWanPublisherConfigs(List<WanPublisherConfig> wanPublisherConfigs)
wanPublisherConfigs
- WAN publisher listpublic WanReplicationConfig addWanPublisherConfig(WanPublisherConfig wanPublisherConfig)
wanPublisherConfig
- the WAN publisher configurationpublic int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
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 © 2018 Hazelcast, Inc.. All Rights Reserved.