Class RSInfo


  • public final class RSInfo
    extends Object
    This class holds information about a RS connected to the topology. This information is to be exchanged through the replication protocol in topology messages, to keep every member DS of the topology aware of the RS topology.

    This class is immutable.

    • Constructor Detail

      • RSInfo

        public RSInfo​(int rsServerId,
                      String rsServerURL,
                      long generationId,
                      byte groupId,
                      int weight)
        Creates a new instance of RSInfo with every given info.
        Parameters:
        rsServerId - The RS id
        rsServerURL - Url of the RS
        generationId - The generation id the RS is using
        groupId - RS group id
        weight - RS weight
    • Method Detail

      • getId

        public int getId()
        Get the RS id.
        Returns:
        the RS id
      • getGenerationId

        public long getGenerationId()
        Get the generation id RS is using.
        Returns:
        the generation id RS is using.
      • getGroupId

        public byte getGroupId()
        Get the RS group id.
        Returns:
        The RS group id
      • getWeight

        public int getWeight()
        Get the RS weight.
        Returns:
        The RS weight
      • equals

        public boolean equals​(Object obj)
        Test if the passed object is equal to this one.
        Overrides:
        equals in class Object
        Parameters:
        obj - The object to test
        Returns:
        True if both objects are equal
      • hashCode

        public int hashCode()
        Computes hash code for this object instance.
        Overrides:
        hashCode in class Object
        Returns:
        Hash code for this object instance.
      • getServerUrl

        public String getServerUrl()
        Gets the server URL.
        Returns:
        the serverUrl
      • toString

        public String toString()
        Returns a string representation of the DS info.
        Overrides:
        toString in class Object
        Returns:
        A string representation of the DS info