Work toward ONOS-1451: Separate Event Key space per instance
Misc changes and cleanup:
* Added new class OnosInstanceId
* Replace (as appropriate) the string controllerId (and associated methods)
with the new class OnosInstanceId
* Renaming: Host -> Device
- Method getDeviceID -> getHostID
- Changed Host Key ID prefix 'D' to 'H'
- Few renaming of Host -> Device inside Javadoc
Change-Id: I59c20d68277ecde2f7df4e7097a4a52d5786df1b
diff --git a/src/main/java/net/onrc/onos/core/topology/MastershipEvent.java b/src/main/java/net/onrc/onos/core/topology/MastershipEvent.java
index 5ed36a3..5668e2f 100644
--- a/src/main/java/net/onrc/onos/core/topology/MastershipEvent.java
+++ b/src/main/java/net/onrc/onos/core/topology/MastershipEvent.java
@@ -7,6 +7,7 @@
import net.floodlightcontroller.core.IFloodlightProviderService.Role;
import net.onrc.onos.core.topology.web.serializers.MastershipEventSerializer;
import net.onrc.onos.core.util.Dpid;
+import net.onrc.onos.core.util.OnosInstanceId;
import org.apache.commons.lang.Validate;
import org.codehaus.jackson.map.annotate.JsonSerialize;
@@ -22,7 +23,7 @@
public class MastershipEvent extends TopologyElement<MastershipEvent> {
private final Dpid dpid;
- private final String onosInstanceId;
+ private final OnosInstanceId onosInstanceId;
private final Role role;
/**
@@ -42,7 +43,8 @@
* @param onosInstanceId the ONOS Instance ID
* @param role the ONOS instance role for the switch.
*/
- public MastershipEvent(Dpid dpid, String onosInstanceId, Role role) {
+ public MastershipEvent(Dpid dpid, OnosInstanceId onosInstanceId,
+ Role role) {
Validate.notNull(dpid);
Validate.notNull(onosInstanceId);
@@ -77,7 +79,7 @@
*
* @return the ONOS Instance ID.
*/
- public String getOnosInstanceId() {
+ public OnosInstanceId getOnosInstanceId() {
return onosInstanceId;
}