public class DeviceReplicaInfo
extends java.lang.Object
| Constructor and Description |
|---|
DeviceReplicaInfo(long term,
org.onosproject.cluster.NodeId master,
java.util.List<org.onosproject.cluster.NodeId> backups) |
| Modifier and Type | Method and 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() |
public DeviceReplicaInfo(long term,
org.onosproject.cluster.NodeId master,
java.util.List<org.onosproject.cluster.NodeId> backups)
public long term()
public org.onosproject.cluster.NodeId master()
term().NodeId for the current term()public boolean isMaster(org.onosproject.cluster.NodeId nodeId)
NodeId is the current master.nodeId - the node ID to checkpublic java.util.List<org.onosproject.cluster.NodeId> backups()
The returned backups are limited by the flow rule store's configured backup count.
public boolean isBackup(org.onosproject.cluster.NodeId nodeId)
nodeId - the node identifierpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object