public class ReplicaSetStatus extends Object
Modifier and Type | Method and 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() |
public String getName()
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