pt.unl.fct.di.novasys.babel.crdts.state.utils

Class ReplicaID

  • All Implemented Interfaces:
    Comparable<ReplicaID>


    public class ReplicaID
    extends Object
    implements Comparable<ReplicaID>
    Class to represent a replica identifier as an unique string. This class uses the Peer class imported from babel-protocolcommons.
    • Field Detail

      • serializer

        public static pt.unl.fct.di.novasys.network.ISerializer<ReplicaID> serializer
        Static serializer for a replica identifier.
    • Constructor Detail

      • ReplicaID

        public ReplicaID(pt.unl.fct.di.novasys.babel.protocols.membership.Peer peer)
        Creates a replica identifier based on a peer A peer contains information about the node address, port, as well as an unique identifier
        Parameters:
        peer - a object coin
    • Method Detail

      • getHost

        public pt.unl.fct.di.novasys.babel.protocols.membership.Peer getHost()
        Gets the replica host identification
      • getReplicaID

        public UUID getReplicaID()
        Gets the replica unique identifier
        Returns:
        replica unique identifier
      • getAddress

        public InetAddress getAddress()
        Gets the peer adress
        Returns:
        the peer adress
      • getHostPort

        public int getHostPort()
        Gets the peer port
        Returns:
        the peer port
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object

Copyright © 2024. All rights reserved.