Class 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 Detail

      • ClusterId

        public ClusterId()
        Construct an instance.
      • ClusterId

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

      • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object