Fixing topology related interface/class tree
- (Mutable)Topology no longer implements ImmutableTopology
--- BaseTopology (was ImmutableTopology)
|
+-- ImmutableTopology (new)
|
+-- MutableTopology (was Topology)
|
+-- RefreshableTopology
|
+-- TopologyInternal
This interface is placed in wrong place. To be fixed later.
Change-Id: Ifa9defcc7c0fc22bba19977fe4ea57eaf792275e
diff --git a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
index 127b2c0..5e07018 100644
--- a/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
+++ b/src/main/java/net/onrc/onos/apps/forwarding/Forwarding.java
@@ -35,7 +35,7 @@
import net.onrc.onos.core.topology.LinkEvent;
import net.onrc.onos.core.topology.Port;
import net.onrc.onos.core.topology.Switch;
-import net.onrc.onos.core.topology.Topology;
+import net.onrc.onos.core.topology.MutableTopology;
import net.onrc.onos.core.util.PortNumber;
import net.onrc.onos.core.util.SwitchPort;
@@ -66,7 +66,7 @@
private IControllerRegistryService controllerRegistryService;
private ITopologyService topologyService;
- private Topology topology;
+ private MutableTopology mutableTopology;
private IPathCalcRuntimeService pathRuntime;
private IntentMap pathIntentMap;
private IntentMap highLevelIntentMap;
@@ -218,7 +218,7 @@
packetService.registerPacketListener(this);
- topology = topologyService.getTopology();
+ mutableTopology = topologyService.getTopology();
highLevelIntentMap = pathRuntime.getHighLevelIntents();
highLevelIntentMap.addChangeListener(highLevelIntentChangedHandler);
pathIntentMap = pathRuntime.getPathIntents();
@@ -263,7 +263,7 @@
// FIXME #getHostByMac() is a blocking call, so it may be better way
// to handle it to avoid the condition.
- Host hostObject = topology.getHostByMac(
+ Host hostObject = mutableTopology.getHostByMac(
MACAddress.valueOf(destinationMac));
if (hostObject == null) {
@@ -293,7 +293,7 @@
@Override
public void run() {
- Host hostObject = topology.getHostByMac(MACAddress.valueOf(eth.getDestinationMACAddress()));
+ Host hostObject = mutableTopology.getHostByMac(MACAddress.valueOf(eth.getDestinationMACAddress()));
if (hostObject == null) {
log.debug("wait {}ms and host was not found. " +
"Send broadcast packet and the thread finish.",