Package io.vertx.mongo.connection
Class ServerSettings
- java.lang.Object
-
- io.vertx.mongo.connection.ServerSettings
-
public class ServerSettings extends java.lang.ObjectSettings relating to monitoring of each server.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description ServerSettings()ServerSettings(JsonObject json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.LonggetHeartbeatFrequency()Gets the frequency that the cluster monitor attempts to reach each server.java.lang.LonggetMinHeartbeatFrequency()Gets the minimum heartbeat frequency.ServerSettingssetHeartbeatFrequency(java.lang.Long heartbeatFrequency)Sets the frequency that the cluster monitor attempts to reach each server.ServerSettingssetMinHeartbeatFrequency(java.lang.Long minHeartbeatFrequency)Sets the minimum heartbeat frequency.JsonObjecttoJson()
-
-
-
Constructor Detail
-
ServerSettings
public ServerSettings()
-
ServerSettings
public ServerSettings(JsonObject json)
-
-
Method Detail
-
toJson
public JsonObject toJson()
-
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
-
-