public class ReplicaSetStatus
extends java.lang.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.
|
java.lang.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.
|
java.lang.String |
toString() |
public java.lang.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 failurepublic java.lang.String toString()
toString
in class java.lang.Object