public class WanPublisherConfig extends Object implements IdentifiedDataSerializable, Versioned
DiscoveryConfig
,
AwsConfig
Constructor and Description |
---|
WanPublisherConfig() |
Modifier and Type | Method and Description |
---|---|
AwsConfig |
getAwsConfig()
Returns the
AwsConfig used by the discovery mechanism for this
WAN publisher. |
String |
getClassName()
Returns the name of the class implementing the WanReplicationEndpoint.
|
DiscoveryConfig |
getDiscoveryConfig()
Returns the currently defined
DiscoveryConfig used by the
discovery mechanism for this WAN publisher. |
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
String |
getGroupName()
Returns the group name of this publisher.
|
int |
getId()
Returns type identifier for this class.
|
Object |
getImplementation()
Returns the implementation of the WanReplicationEndpoint.
|
WanPublisherState |
getInitialPublisherState()
Returns the initial WAN publisher state.
|
Map<String,Comparable> |
getProperties()
Returns the WAN publisher properties.
|
int |
getQueueCapacity()
Returns the capacity of the primary and backup queue for WAN replication events.
|
WANQueueFullBehavior |
getQueueFullBehavior()
Returns the configured behaviour of this WAN publisher when the WAN queue
is full.
|
WanSyncConfig |
getWanSyncConfig()
Returns the config for the WAN sync mechanism.
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
WanPublisherConfig |
setAwsConfig(AwsConfig awsConfig)
Sets the
AwsConfig used by the discovery mechanism for this
WAN publisher. |
WanPublisherConfig |
setClassName(String className)
Sets the name of the class implementing the WanReplicationEndpoint.
|
WanPublisherConfig |
setDiscoveryConfig(DiscoveryConfig discoveryConfig)
Sets the
DiscoveryConfig used by the discovery mechanism for
this WAN publisher. |
WanPublisherConfig |
setGroupName(String groupName)
Set the group name of this publisher.
|
WanPublisherConfig |
setImplementation(Object implementation)
Sets the implementation of the WanReplicationEndpoint.
|
WanPublisherConfig |
setInitialPublisherState(WanPublisherState initialPublisherState)
Sets the initial publisher state.
|
WanPublisherConfig |
setProperties(Map<String,Comparable> properties)
Sets the WAN publisher properties.
|
WanPublisherConfig |
setQueueCapacity(int queueCapacity)
Sets the capacity of the primary and backup queue for WAN replication events.
|
WanPublisherConfig |
setQueueFullBehavior(WANQueueFullBehavior queueFullBehavior)
Sets the configured behaviour of this WAN publisher when the WAN queue is
full.
|
WanPublisherConfig |
setWanSyncConfig(WanSyncConfig wanSyncConfig)
Sets the config for the WAN sync mechanism.
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public WanSyncConfig getWanSyncConfig()
public WanPublisherConfig setWanSyncConfig(WanSyncConfig wanSyncConfig)
wanSyncConfig
- the WAN sync configpublic String getGroupName()
WanReplicationConfig
and for
authentication on the target endpoint.public WanPublisherConfig setGroupName(String groupName)
WanReplicationConfig
and for
authentication on the target endpoint.groupName
- the publisher group namepublic int getQueueCapacity()
One hazelcast instance can have up to 2*queueCapacity
events since
we keep up to queueCapacity
primary events (events with keys for
which the instance is the owner) and queueCapacity
backup events
(events with keys for which the instance is the backup).
Events for IMap and ICache count against this limit collectively.
When the queue capacity is reached, backup events are dropped while normal
replication events behave as determined by the getQueueFullBehavior()
.
The default queue size for replication queues is .
public WanPublisherConfig setQueueCapacity(int queueCapacity)
One hazelcast instance can have up to 2*queueCapacity
events since
we keep up to queueCapacity
primary events (events with keys for
which the instance is the owner) and queueCapacity
backup events
(events with keys for which the instance is the backup).
Events for IMap and ICache count against this limit collectively.
When the queue capacity is reached, backup events are dropped while normal
replication events behave as determined by the getQueueFullBehavior()
.
The default queue size for replication queues is .
queueCapacity
- the queue capacitypublic WANQueueFullBehavior getQueueFullBehavior()
public WanPublisherConfig setQueueFullBehavior(WANQueueFullBehavior queueFullBehavior)
queueFullBehavior
- the behaviour of this publisher when the WAN queue is fullpublic WanPublisherState getInitialPublisherState()
public WanPublisherConfig setInitialPublisherState(WanPublisherState initialPublisherState)
initialPublisherState
- the statepublic Map<String,Comparable> getProperties()
public WanPublisherConfig setProperties(Map<String,Comparable> properties)
properties
- WAN publisher propertiespublic String getClassName()
WanReplicationEndpoint
.public WanPublisherConfig setClassName(String className)
WanReplicationEndpoint
.className
- the name of the class implementation for the WAN replicationpublic Object getImplementation()
WanReplicationEndpoint
.public WanPublisherConfig setImplementation(Object implementation)
WanReplicationEndpoint
.implementation
- the implementation for the WAN replicationpublic AwsConfig getAwsConfig()
AwsConfig
used by the discovery mechanism for this
WAN publisher.public WanPublisherConfig setAwsConfig(AwsConfig awsConfig)
AwsConfig
used by the discovery mechanism for this
WAN publisher.awsConfig
- the AWS discovery configurationIllegalArgumentException
- if awsConfig is nullpublic DiscoveryConfig getDiscoveryConfig()
DiscoveryConfig
used by the
discovery mechanism for this WAN publisher.public WanPublisherConfig setDiscoveryConfig(DiscoveryConfig discoveryConfig)
DiscoveryConfig
used by the discovery mechanism for
this WAN publisher.discoveryConfig
- configuration to setIllegalArgumentException
- if discoveryProvidersConfig is nullpublic 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.