Network Graph refactoring: renamed class NetworkGraphImpl to TopologyManager
Change-Id: I247c0e9a0ac7a19dfcc7ca97fceef734bad68a5d
diff --git a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/DeviceImpl.java b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/DeviceImpl.java
index 808d4a6..4a79edd 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/DeviceImpl.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/DeviceImpl.java
@@ -53,7 +53,7 @@
}
/**
- * Only {@link NetworkGraphImpl} should use this method
+ * Only {@link TopologyManager} should use this method
* @param p
*/
void addAttachmentPoint(Port p) {
@@ -62,7 +62,7 @@
}
/**
- * Only {@link NetworkGraphImpl} should use this method
+ * Only {@link TopologyManager} should use this method
* @param p
*/
boolean removeAttachmentPoint(Port p) {
@@ -70,7 +70,7 @@
}
/**
- * Only {@link NetworkGraphImpl} should use this method
+ * Only {@link TopologyManager} should use this method
* @param p
*/
boolean addIpAddress(InetAddress addr) {
@@ -78,7 +78,7 @@
}
/**
- * Only {@link NetworkGraphImpl} should use this method
+ * Only {@link TopologyManager} should use this method
* @param p
*/
boolean removeIpAddress(InetAddress addr) {
diff --git a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphDatastore.java b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphDatastore.java
index 126d299..d5dd9e0 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphDatastore.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphDatastore.java
@@ -37,9 +37,9 @@
private static final int NUM_RETRIES = 10;
- private final NetworkGraphImpl graph;
+ private final TopologyManager graph;
- public NetworkGraphDatastore(NetworkGraphImpl graph) {
+ public NetworkGraphDatastore(TopologyManager graph) {
this.graph = graph;
}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphModule.java b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphModule.java
index 80f0d0b..4b2ef34 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphModule.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphModule.java
@@ -21,7 +21,7 @@
// This is initialized as a module for now
// private RCNetworkGraphPublisher eventListener;
- private NetworkGraphImpl networkGraph;
+ private TopologyManager networkGraph;
//private NetworkGraphDatastore southboundNetworkGraph;
private IDatagridService datagridService;
private IControllerRegistryService registryService;
@@ -64,7 +64,7 @@
registryService = context.getServiceImpl(IControllerRegistryService.class);
networkGraphListeners = new CopyOnWriteArrayList<>();
- networkGraph = new NetworkGraphImpl(registryService, networkGraphListeners);
+ networkGraph = new TopologyManager(registryService, networkGraphListeners);
//southboundNetworkGraph = new NetworkGraphDatastore(networkGraph);
}
diff --git a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphImpl.java b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/TopologyManager.java
similarity index 98%
rename from src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphImpl.java
rename to src/main/java/net/onrc/onos/ofcontroller/networkgraph/TopologyManager.java
index d96188f..532ad8d 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/networkgraph/NetworkGraphImpl.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/networkgraph/TopologyManager.java
@@ -39,11 +39,11 @@
* re-ordering. e.g.) Link Add came in, but Switch was not there.
*
*/
-public class NetworkGraphImpl extends AbstractNetworkGraph implements
+public class TopologyManager extends AbstractNetworkGraph implements
NetworkGraphDiscoveryInterface, NetworkGraphReplicationInterface {
private static final Logger log = LoggerFactory
- .getLogger(NetworkGraphImpl.class);
+ .getLogger(TopologyManager.class);
private IEventChannel<byte[], TopologyEvent> eventChannel;
private static final String EVENT_CHANNEL_NAME = "onos.topology";
@@ -53,7 +53,7 @@
private final IControllerRegistryService registryService;
private CopyOnWriteArrayList<INetworkGraphListener> networkGraphListeners;
- public NetworkGraphImpl(IControllerRegistryService registryService, CopyOnWriteArrayList<INetworkGraphListener> networkGraphListeners) {
+ public TopologyManager(IControllerRegistryService registryService, CopyOnWriteArrayList<INetworkGraphListener> networkGraphListeners) {
super();
datastore = new NetworkGraphDatastore(this);
this.registryService = registryService;
@@ -98,7 +98,7 @@
Collection<EventEntry<TopologyEvent>> collection =
new LinkedList<EventEntry<TopologyEvent>>();
- this.setName("NetworkGraphImpl.EventHandler " + this.getId());
+ this.setName("TopologyManager.EventHandler " + this.getId());
startup();
//