Class WanReplicationConfig
- All Implemented Interfaces:
NamedConfig
,DataSerializable
,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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a WAN publisher configuration using the built-in batching WAN implementation to this WAN replication.Adds a custom WAN publisher implementation configuration to this WAN replication.boolean
Returns the list of WAN publisher configurations using the built-in batching WAN implementation for this WAN replication.int
Returns type identifier for this class.Returns theWAN consumer configuration
for this WAN replication.Returns the list of custom WAN publisher implementations for this WAN replication.int
Returns DataSerializableFactory factory ID for this class.getName()
int
hashCode()
void
Reads fields from the input streamsetBatchPublisherConfigs
(List<WanBatchPublisherConfig> batchPublisherConfigs) Sets the list of WAN publisher configurations using the built-in batching WAN implementation for this WAN replication.setConsumerConfig
(WanConsumerConfig consumerConfig) Sets theWAN consumer configuration
for this WAN replication.setCustomPublisherConfigs
(List<WanCustomPublisherConfig> customPublisherConfigs) Sets the list of custom WAN publisher implementations for this WAN replication.Sets the name of this WAN replication config.toString()
void
Writes object fields to output stream
-
Constructor Details
-
WanReplicationConfig
public WanReplicationConfig()
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceNamedConfig
-
setName
Sets the name of this WAN replication config. This name is used by theWanReplicationRef
configuration.- Specified by:
setName
in interfaceNamedConfig
- Parameters:
name
- the WAN replication config name- Returns:
- this config
- See Also:
-
getConsumerConfig
Returns theWAN consumer configuration
for this WAN replication. The WAN consumer is in charge of consuming (processing) incoming WAN events. -
setConsumerConfig
Sets theWAN consumer configuration
for this WAN replication. The WAN consumer is in charge of consuming (processing) incoming WAN events.- Parameters:
consumerConfig
- the WAN consumer configuration- Returns:
- this config
-
getCustomPublisherConfigs
Returns the list of custom WAN publisher implementations for this WAN replication. -
setCustomPublisherConfigs
public WanReplicationConfig setCustomPublisherConfigs(@Nonnull List<WanCustomPublisherConfig> customPublisherConfigs) Sets the list of custom WAN publisher implementations for this WAN replication.- Parameters:
customPublisherConfigs
- publisher configurations- Returns:
- this config
-
getBatchPublisherConfigs
Returns the list of WAN publisher configurations using the built-in batching WAN implementation for this WAN replication. -
setBatchPublisherConfigs
public WanReplicationConfig setBatchPublisherConfigs(@Nonnull List<WanBatchPublisherConfig> batchPublisherConfigs) Sets the list of WAN publisher configurations using the built-in batching WAN implementation for this WAN replication.- Parameters:
batchPublisherConfigs
- configurations for the built-in WAN publisher implementation- Returns:
- this config
-
addBatchReplicationPublisherConfig
Adds a WAN publisher configuration using the built-in batching WAN implementation to this WAN replication.- Parameters:
config
- the WAN publisher configuration- Returns:
- this config
-
addCustomPublisherConfig
Adds a custom WAN publisher implementation configuration to this WAN replication.- Parameters:
config
- the WAN publisher configuration- Returns:
- this config
-
toString
-
getFactoryId
public int getFactoryId()Description copied from interface:IdentifiedDataSerializable
Returns DataSerializableFactory factory ID for this class.- Specified by:
getFactoryId
in interfaceIdentifiedDataSerializable
- Returns:
- factory ID
-
getClassId
public int getClassId()Description copied from interface:IdentifiedDataSerializable
Returns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
getClassId
in interfaceIdentifiedDataSerializable
- Returns:
- type ID
-
writeData
Description copied from interface:DataSerializable
Writes object fields to output stream- Specified by:
writeData
in interfaceDataSerializable
- Parameters:
out
- output- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the output stream has been closed.
-
readData
Description copied from interface:DataSerializable
Reads fields from the input stream- Specified by:
readData
in interfaceDataSerializable
- Parameters:
in
- input- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the input stream has been closed.
-
equals
-
hashCode
public int hashCode()
-