Class DeviceReplicaInfo


  • public class DeviceReplicaInfo
    extends Object
    Device term context.
    • Constructor Summary

      Constructors 
      Constructor Description
      DeviceReplicaInfo​(long term, org.onosproject.cluster.NodeId master, List<org.onosproject.cluster.NodeId> backups)  
    • Constructor Detail

      • DeviceReplicaInfo

        public DeviceReplicaInfo​(long term,
                                 org.onosproject.cluster.NodeId master,
                                 List<org.onosproject.cluster.NodeId> backups)
    • Method Detail

      • term

        public long term()
        Returns the mastership term.
        Returns:
        the mastership term
      • master

        public org.onosproject.cluster.NodeId master()
        Returns the master for the term().
        Returns:
        the master NodeId for the current term()
      • isMaster

        public boolean isMaster​(org.onosproject.cluster.NodeId nodeId)
        Returns a boolean indicating whether the given NodeId is the current master.
        Parameters:
        nodeId - the node ID to check
        Returns:
        indicates whether the given node identifier is the identifier of the current master
      • backups

        public List<org.onosproject.cluster.NodeId> backups()
        Returns a list of all active backup nodes in priority order.

        The returned backups are limited by the flow rule store's configured backup count.

        Returns:
        a list of backup nodes in priority order
      • isBackup

        public boolean isBackup​(org.onosproject.cluster.NodeId nodeId)
        Returns a boolean indicating whether the given node is a backup.
        Parameters:
        nodeId - the node identifier
        Returns:
        indicates whether the given node is a backup
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object