com.mongodb
Class ReplicaSetStatus

java.lang.Object
  extended by com.mongodb.ReplicaSetStatus

public class ReplicaSetStatus
extends Object

keeps replica set status has a background thread to ping so it stays current TODO pull config to get priority slave delay tags (when we do it)


Method Summary
 ServerAddress getMaster()
           
 int getMaxBsonObjectSize()
          Gets the maximum size for a BSON object supported by the current master server.
 String getName()
           
 boolean isMaster(ServerAddress srv)
           
static void main(String[] args)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getName

public String getName()

toString

public String toString()
Overrides:
toString in class Object

getMaster

public ServerAddress getMaster()
Returns:
master or null if don't have one

isMaster

public boolean isMaster(ServerAddress srv)
Parameters:
srv - the server to compare
Returns:
indication if the ServerAddress is the current Master/Primary

getMaxBsonObjectSize

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.

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception