Package com.mongodb
Class ReplicaSetStatus
java.lang.Object
com.mongodb.ReplicaSetStatus
Deprecated.
Keeps replica set status.
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Gets the ServerAddress of the master server in this replica set.int
Deprecated.Gets the maximum size for a BSON object supported by the current master server.getName()
Deprecated.Get the name of the replica set.boolean
isMaster
(ServerAddress serverAddress) Deprecated.Checks to see if a given server is the primary server in this replica set.toString()
Deprecated.
-
Method Details
-
getName
Deprecated.Get the name of the replica set.- Returns:
- the name of the replica set.
-
getMaster
Deprecated.Gets the ServerAddress of the master server in this replica set.- Returns:
- master or null if don't have one
- Throws:
MongoException
- if there's a failure
-
isMaster
Deprecated.Checks to see if a given server is the primary server in this replica set.- Parameters:
serverAddress
- the server to compare- Returns:
- true if the given ServerAddress is the current Master/Primary
-
getMaxBsonObjectSize
public int getMaxBsonObjectSize()Deprecated.Gets the maximum size for a BSON object supported by the current master server. Note that this value may change over time depending on which server is master.- Returns:
- the maximum size, or 0 if not obtained from servers yet.
- Throws:
MongoException
- if there's a failure
-
toString
Deprecated.
-
MongoClientOptions.Builder.addClusterListener(ClusterListener)