public class ReplicaSetStatus extends Object
Modifier and Type | Method | Description |
---|---|---|
ServerAddress |
getMasterβ() |
Gets the ServerAddress of the master server in this replica set.
|
int |
getMaxBsonObjectSizeβ() |
Gets the maximum size for a BSON object supported by the current master server.
|
String |
getNameβ() |
Get the name of the replica set.
|
boolean |
isMasterβ(ServerAddress serverAddress) |
Checks to see if a given server is the primary server in this replica set.
|
String |
toStringβ() |
@Nullable public String getNameβ()
@Nullable public ServerAddress getMasterβ()
MongoException
- if there's a failurepublic boolean isMasterβ(ServerAddress serverAddress)
serverAddress
- the server to comparepublic int getMaxBsonObjectSizeβ()
MongoException
- if there's a failure