Class ServerSettings


  • public class ServerSettings
    extends java.lang.Object
    Settings relating to monitoring of each server.
    Since:
    3.0
    • Constructor Detail

      • ServerSettings

        public ServerSettings()
      • ServerSettings

        public ServerSettings​(JsonObject json)
    • Method Detail

      • setHeartbeatFrequency

        public ServerSettings setHeartbeatFrequency​(java.lang.Long heartbeatFrequency)
        Sets the frequency that the cluster monitor attempts to reach each server. The default value is 10 seconds.
        Parameters:
        heartbeatFrequency - the heartbeat frequency (in milliseconds)
        Returns:
        this
      • getHeartbeatFrequency

        public java.lang.Long getHeartbeatFrequency()
        Gets the frequency that the cluster monitor attempts to reach each server. The default value is 10 seconds.
        Returns:
        the heartbeat frequency
      • setMinHeartbeatFrequency

        public ServerSettings setMinHeartbeatFrequency​(java.lang.Long minHeartbeatFrequency)
        Sets the minimum heartbeat frequency. In the event that the driver has to frequently re-check a server's availability, it will wait at least this long since the previous check to avoid wasted effort. The default value is 500 milliseconds.
        Parameters:
        minHeartbeatFrequency - the minimum heartbeat frequency (in milliseconds)
        Returns:
        this
      • getMinHeartbeatFrequency

        public java.lang.Long getMinHeartbeatFrequency()
        Gets the minimum heartbeat frequency. In the event that the driver has to frequently re-check a server's availability, it will wait at least this long since the previous check to avoid wasted effort. The default value is 500 milliseconds.
        Returns:
        the heartbeat reconnect retry frequency