Class ClusterId

java.lang.Object
com.mongodb.connection.ClusterId

public final class ClusterId extends Object
A client-generated identifier that uniquely identifies a connection to a MongoDB cluster, which could be sharded, replica set, or standalone.
Since:
3.0
  • Constructor Details

    • ClusterId

      public ClusterId()
      Construct an instance.
    • ClusterId

      public ClusterId(String description)
      Construct an instance.
      Parameters:
      description - the user defined description of the MongoClient
  • Method Details

    • getValue

      public String getValue()
      Gets the value of the identifier.
      Returns:
      the value
    • getDescription

      public String getDescription()
      Gets the user defined description of the MongoClient.
      Returns:
      the user defined description of the MongoClient
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object