Package com.mongodb

Class ReplicaSetStatus

java.lang.Object
com.mongodb.ReplicaSetStatus

@Deprecated public class ReplicaSetStatus extends Object
Keeps replica set status.
  • Method Details

    • getName

      @Nullable public String getName()
      Deprecated.
      Get the name of the replica set.
      Returns:
      the name of the replica set.
    • getMaster

      @Nullable public ServerAddress getMaster()
      Deprecated.
      Gets the ServerAddress of the master server in this replica set.
      Returns:
      master or null if don't have one
      Throws:
      MongoException - if there's a failure
    • isMaster

      public boolean isMaster(ServerAddress serverAddress)
      Deprecated.
      Checks to see if a given server is the primary server in this replica set.
      Parameters:
      serverAddress - the server to compare
      Returns:
      true if the given ServerAddress is the current Master/Primary
    • getMaxBsonObjectSize

      public int getMaxBsonObjectSize()
      Deprecated.
      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.
      Throws:
      MongoException - if there's a failure
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object