public class DeviceReplicaInfo extends Object
| Constructor and Description |
|---|
DeviceReplicaInfo(long term,
org.onosproject.cluster.NodeId master,
List<org.onosproject.cluster.NodeId> backups) |
| Modifier and Type | Method and Description |
|---|---|
List<org.onosproject.cluster.NodeId> |
backups()
Returns a list of all active backup nodes in priority order.
|
boolean |
equals(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.
|
String |
toString() |
public DeviceReplicaInfo(long term,
org.onosproject.cluster.NodeId master,
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 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 identifier