public interface ReplicationConfig extends Config
Sessions and topics can be replicated across a cluster. The configuration here covers what is replicated and what is used to replicate the data. Replication of data between servers is provided by third party applications and must be configured in an implementation specific way.
Modifier and Type | Method and Description |
---|---|
ConfigurationReplicationConfig |
getConfigurationReplication()
Get the configuration for the replication of configuration items.
|
String |
getConnector()
Gets the name of the connector used to configure connections to other
servers in the cluster.
|
String |
getExternalHost()
Gets the host name peer servers should use to connect to this
server.
|
Integer |
getExternalPort()
Gets the port.
|
String |
getProvider()
Get the provider for replication.
|
int |
getQuorum()
Gets the quorum size.
|
SessionReplicationConfig |
getSessionReplication()
Get the configuration for the session replication.
|
TopicReplicationConfig |
getTopicReplication()
Get the configuration for the topic replication.
|
boolean |
isKubernetesEnabled()
Is Kubernetes replication configuration enabled.
|
void |
setConnector(String connector)
Sets the name of the connector used to configure connections to other
servers in the cluster.
|
void |
setExternalHost(String host)
Optionally override the host name that peer servers should use to connect
to this server.
|
void |
setExternalPort(Integer port)
Optionally override the port that peer servers should use to connect to
this server.
|
void |
setKubernetesEnabled(boolean enabled)
Set Kubernetes replication configuration enabled.
|
void |
setProvider(String provider)
Set the provider for replication.
|
void |
setQuorum(int quorum)
Sets the quorum size.
|
String getProvider()
void setProvider(String provider)
This represents the replication back-end. Currently only HAZELCAST is supported.
provider
- The provider for replication.SessionReplicationConfig getSessionReplication()
TopicReplicationConfig getTopicReplication()
ConfigurationReplicationConfig getConfigurationReplication()
void setConnector(String connector)
The connector determines the listen host and port, buffer sizes, and the outbound queue size.
If this property is not set, the first configured connector will be used instead and a warning will be issued.
connector
- the name of the connector used to configure connections
to other servers in the clusterString getConnector()
void setExternalHost(String host) throws ConfigException
If null, the host name will be derived from the configured
connector
.
The externalHost and externalPort properties allow for deployments to environments that use network address translation.
host
- the host name peer servers should use to connect to this
serverConfigException
- if the port is not in the valid rangeString getExternalHost()
connector
.void setExternalPort(Integer port) throws ConfigException
If null, the port will be derived from the configured
connector
.
The externalHost and externalPort properties allow for deployments to environments that use network address translation.
port
- the port peer servers should use to connect to this serverConfigException
- if the port is not in the valid rangeInteger getExternalPort()
Can be null. This takes precedence to the connector if both are set.
boolean isKubernetesEnabled()
Controls whether any Kubernetes replication configuration services will be started.
void setKubernetesEnabled(boolean enabled)
enabled
- is Kubernetes replication configuration enabledint getQuorum()
The quorum size is the minimum number of cluster members needed to run the cluster.
The value 0 indicates no quorum is required.
void setQuorum(int quorum) throws ConfigException
The quorum size is the minimum number of cluster members needed to run the cluster.
The value 0 indicates no quorum is required. If the quorum is required it must be at least two. A quorum is not required by default.
quorum
- the quorum sizeConfigException
- if the new quorum size is less than 2 and not 0Copyright © 2021 Push Technology Ltd. All Rights Reserved.