Interface ReplicationConfig

All Superinterfaces:
Config

public interface ReplicationConfig extends Config
The configuration for replication.

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.

Since:
5.0
  • Method Details

    • getProvider

      String getProvider()
      Get the provider for replication.
      Returns:
      The provider for replication.
    • setProvider

      void setProvider(String provider)
      Set the provider for replication.

      This represents the replication back-end. Currently only HAZELCAST is supported.

      Parameters:
      provider - The provider for replication.
    • getSessionReplication

      SessionReplicationConfig getSessionReplication()
      Get the configuration for the session replication.
      Returns:
      The session replication.
    • getTopicReplication

      TopicReplicationConfig getTopicReplication()
      Get the configuration for the topic replication.
      Returns:
      The topic replication.
    • getConfigurationReplication

      ConfigurationReplicationConfig getConfigurationReplication()
      Get the configuration for the replication of configuration items.
      Returns:
      The configuration replication
      Since:
      6.3
    • setConnector

      void setConnector(String connector)
      Sets the name of the connector used to configure connections to other servers in the cluster. A connector with the corresponding name should be configured in Server.xml.

      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.

      Parameters:
      connector - the name of the connector used to configure connections to other servers in the cluster
      Since:
      6.0
    • getConnector

      String getConnector()
      Gets the name of the connector used to configure connections to other servers in the cluster.
      Returns:
      the name of the connector used to configure connections to other servers in the cluster
      Since:
      6.0
    • setExternalHost

      void setExternalHost(String host) throws ConfigException
      Optionally override the host name that peer servers should use to connect to this server.

      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.

      Parameters:
      host - the host name peer servers should use to connect to this server
      Throws:
      ConfigException - if the port is not in the valid range
      Since:
      6.0
    • getExternalHost

      String getExternalHost()
      Gets the host name peer servers should use to connect to this server. If null, the host name will be derived from the configured connector.
      Returns:
      the host name peer servers should use to connect to this server
      Since:
      6.0
    • setExternalPort

      void setExternalPort(Integer port) throws ConfigException
      Optionally override the port that peer servers should use to connect to this server.

      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.

      Parameters:
      port - the port peer servers should use to connect to this server
      Throws:
      ConfigException - if the port is not in the valid range
      Since:
      6.0
    • getExternalPort

      Integer getExternalPort()
      Gets the port.

      Can be null. This takes precedence to the connector if both are set.

      Returns:
      the port for other servers to connect to
      Since:
      6.0
    • isKubernetesEnabled

      @Deprecated boolean isKubernetesEnabled()
      Deprecated.
      since 6.11

      Use the official Hazelcast feature instead.

      Is Kubernetes replication configuration enabled.

      Controls whether any Kubernetes replication configuration services will be started.

      Returns:
      is Kubernetes replication configuration enabled
      Since:
      6.0
    • setKubernetesEnabled

      @Deprecated void setKubernetesEnabled(boolean enabled)
      Deprecated.
      since 6.11

      Use the official Hazelcast feature instead.

      Set Kubernetes replication configuration enabled.
      Parameters:
      enabled - is Kubernetes replication configuration enabled
      Since:
      6.0
    • getQuorum

      int getQuorum()
      Gets the quorum size.

      The quorum size is the minimum number of cluster members needed to run the cluster.

      The value 0 indicates no quorum is required.

      Returns:
      the quorum size
      Since:
      6.1
    • setQuorum

      void setQuorum(int quorum) throws ConfigException
      Sets the quorum size.

      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.

      Parameters:
      quorum - the quorum size
      Throws:
      ConfigException - if the new quorum size is less than 2 and not 0
      Since:
      6.1