public class ReplicaSetStatus extends Object
Modifier and Type | Method and Description |
---|---|
com.mongodb.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(com.mongodb.ServerAddress serverAddress)
Checks to see if a given server is the primary server in this replica set.
|
String |
toString() |
public String getName()
public com.mongodb.ServerAddress getMaster()
MongoException
- if there's a failurepublic boolean isMaster(com.mongodb.ServerAddress serverAddress)
serverAddress
- the server to comparepublic int getMaxBsonObjectSize()
MongoException
- if there's a failureCopyright © 2017. All rights reserved.