commit | 98bd12f69c8bcba960a8e88d35fc7f48fcd265fa | [log] [tgz] |
---|---|---|
author | Ayaka Koshibe <ayaka@onlab.us> | Sat Nov 01 20:13:37 2014 -0700 |
committer | Ayaka Koshibe <ayaka@onlab.us> | Sat Nov 01 20:13:37 2014 -0700 |
tree | 18d180d1814ac6eeff52ef06f84bb83eb2f37d90 | |
parent | 548153202c90c7f7bf4d7876ba1e574e90747c62 [diff] [blame] |
modificiations to emit BACKUP_CHANGED Mastership events Change-Id: Id61dcc9dc42c8c246313afbec8d19142e6c855a5 Conflicts: core/net/src/main/java/org/onlab/onos/net/device/impl/DeviceManager.java
diff --git a/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValue.java b/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValue.java index 8cc05e8..aa5d911 100644 --- a/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValue.java +++ b/core/store/dist/src/main/java/org/onlab/onos/store/mastership/impl/RoleValue.java
@@ -55,6 +55,13 @@ return value.get(type); } + /** + * Returns the first node to match the MastershipRole, or if there + * are none, null. + * + * @param type the role + * @return a node ID or null + */ public NodeId get(MastershipRole type) { return value.get(type).isEmpty() ? null : value.get(type).get(0); }