Class ZooKeeperSeedNodeProviderConfig

    • Constructor Detail

      • ZooKeeperSeedNodeProviderConfig

        public ZooKeeperSeedNodeProviderConfig()
    • Method Detail

      • getConnectionString

        public String getConnectionString()
        Returns the list of ZooKeeper servers to connect to (see setConnectionString(String)).
        Returns:
        ZooKeeper connection string.
      • setConnectionString

        public void setConnectionString​(String connectionString)
        Set the list of ZooKeeper servers to connect to.

        Connection string can be specified as a comma-separated list of host:port addresses (f.e. 127.0.1:2181,127.0.01:2182)

        Parameters:
        connectionString - Comma-separated list of addresses.
      • getConnectTimeout

        public int getConnectTimeout()
        Returns the ZooKeeper connection timeout in milliseconds (see setConnectTimeout(int)).
        Returns:
        Timeout in milliseconds.
      • setConnectTimeout

        public void setConnectTimeout​(int connectTimeout)
        Sets the ZooKeeper connection timeout in milliseconds.

        Default value of this parameter is 5000.

        Parameters:
        connectTimeout - Timeout in milliseconds.
      • getSessionTimeout

        public int getSessionTimeout()
        Returns the ZooKeeper session timeout in milliseconds (see setSessionTimeout(int)).
        Returns:
        Timeout in milliseconds.
      • setSessionTimeout

        public void setSessionTimeout​(int sessionTimeout)
        Sets the ZooKeeper session timeout in milliseconds.

        Note that ZooKeeperSeedNodeProvider uses short-lived connection when interacting with ZooKeeper server (i.e. it creates a new connection for each operation and then closes it once operation is complete). Thus, it is not necessary to set this parameter to a large value.

        Default value of this parameter is 10000.

        Parameters:
        sessionTimeout - Timeout in milliseconds.
      • getBasePath

        public String getBasePath()
        Returns the base path to store seed nodes information in ZooKeeper (see setBasePath(String)).
        Returns:
        Base path to store seed nodes.
      • setBasePath

        public void setBasePath​(String basePath)
        Sets the base path to store seed nodes information in ZooKeeper.

        Default value of this parameter is "/hekate/cluster".

        Parameters:
        basePath - Base path to store seed nodes.
      • getCleanupInterval

        public int getCleanupInterval()
        Returns the time interval in milliseconds between stale node cleanup runs (see setCleanupInterval(int)).
        Returns:
        Time interval in milliseconds.
      • setCleanupInterval

        public void setCleanupInterval​(int cleanupInterval)
        Sets the time interval in milliseconds between stale node cleanup runs.

        Default value of this parameter is 60000.

        For more details please see the documentation of SeedNodeProvider.

        Parameters:
        cleanupInterval - Time interval in milliseconds.
        See Also:
        SeedNodeProvider.cleanupInterval()