public class

ReplicaSetStatus

extends Object
java.lang.Object
   ↳ com.mongodb.ReplicaSetStatus

Class Overview

Keeps replica set status. Maintains a background thread to ping all members of the set to keep the status current.

Summary

Public Methods
ServerAddress getMaster()
int getMaxBsonObjectSize()
Gets the maximum size for a BSON object supported by the current master server.
String getName()
boolean isMaster(ServerAddress srv)
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public ServerAddress getMaster ()

Returns
  • master or null if don't have one

public int getMaxBsonObjectSize ()

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.

public String getName ()

public boolean isMaster (ServerAddress srv)

Parameters
srv the server to compare
Returns
  • indication if the ServerAddress is the current Master/Primary

public String toString ()