Package org.onosproject.store.flow.impl
Class DeviceReplicaInfo
- java.lang.Object
-
- org.onosproject.store.flow.impl.DeviceReplicaInfo
-
public class DeviceReplicaInfo extends java.lang.ObjectDevice 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.booleanequals(java.lang.Object object)inthashCode()booleanisBackup(org.onosproject.cluster.NodeId nodeId)Returns a boolean indicating whether the given node is a backup.booleanisMaster(org.onosproject.cluster.NodeId nodeId)Returns a boolean indicating whether the givenNodeIdis the current master.org.onosproject.cluster.NodeIdmaster()Returns the master for theterm().longterm()Returns the mastership term.java.lang.StringtoString()
-
-
-
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 theterm().- Returns:
- the master
NodeIdfor the currentterm()
-
isMaster
public boolean isMaster(org.onosproject.cluster.NodeId nodeId)
Returns a boolean indicating whether the givenNodeIdis 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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object object)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-