Class ClusterId


  • public final class ClusterId
    extends java.lang.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 Summary

      Constructors 
      Constructor Description
      ClusterId()
      Construct an instance.
      ClusterId​(java.lang.String description)
      Construct an instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.lang.String getDescription()
      Gets the user defined description of the MongoClient.
      java.lang.String getValue()
      Gets the value of the identifier.
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ClusterId

        public ClusterId()
        Construct an instance.
      • ClusterId

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

      • getValue

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

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object