Class DeviceReplicaInfo


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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<org.onosproject.cluster.NodeId> backups()
      Returns a list of all active backup nodes in priority order.
      boolean equals​(java.lang.Object object)  
      int hashCode()  
      boolean isBackup​(org.onosproject.cluster.NodeId nodeId)
      Returns a boolean indicating whether the given node is a backup.
      boolean isMaster​(org.onosproject.cluster.NodeId nodeId)
      Returns a boolean indicating whether the given NodeId is the current master.
      org.onosproject.cluster.NodeId master()
      Returns the master for the term().
      long term()
      Returns the mastership term.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • DeviceReplicaInfo

        public DeviceReplicaInfo​(long term,
                                 org.onosproject.cluster.NodeId master,
                                 java.util.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 java.util.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 java.lang.Object
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • toString

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