Renamed Trie to Tree for consistency.
This is in the context of SDN-IP's patricia tree.
Change-Id: I59437fb49580aba01a287e9bc0bf035c093c7b95
diff --git a/src/main/java/net/onrc/onos/apps/bgproute/BgpRoute.java b/src/main/java/net/onrc/onos/apps/bgproute/BgpRoute.java
index 8f42605..ed70ae4 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/BgpRoute.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/BgpRoute.java
@@ -84,8 +84,8 @@
private IRestApiService restApi;
private IProxyArpService proxyArp;
- private IPatriciaTrie<RibEntry> ptree;
- private IPatriciaTrie<Interface> interfacePtrie;
+ private IPatriciaTree<RibEntry> ptree;
+ private IPatriciaTree<Interface> interfacePtree;
private BlockingQueue<RibUpdate> ribUpdates;
private String bgpdRestIp;
@@ -222,10 +222,10 @@
throw new ConfigurationRuntimeException("Error in JSON file", e);
}
- // Populate the interface Patricia Trie
+ // Populate the interface Patricia Tree
for (Interface intf : interfaces.values()) {
Prefix prefix = new Prefix(intf.getIpAddress().getAddress(), intf.getPrefixLength());
- interfacePtrie.put(prefix, intf);
+ interfacePtree.put(prefix, intf);
}
}
@@ -260,8 +260,8 @@
public void init(FloodlightModuleContext context)
throws FloodlightModuleException {
- ptree = new PatriciaTrie<RibEntry>(32);
- interfacePtrie = new PatriciaTrie<Interface>(32);
+ ptree = new PatriciaTree<RibEntry>(32);
+ interfacePtree = new PatriciaTree<Interface>(32);
ribUpdates = new LinkedBlockingQueue<RibUpdate>();
@@ -327,13 +327,13 @@
}
@Override
- public IPatriciaTrie<RibEntry> getPtree() {
+ public IPatriciaTree<RibEntry> getPtree() {
return ptree;
}
@Override
public void clearPtree() {
- ptree = new PatriciaTrie<RibEntry>(32);
+ ptree = new PatriciaTree<RibEntry>(32);
}
@Override
@@ -466,7 +466,7 @@
} else {
//Route to non-peer
log.debug("Route to non-peer {}", dstIpAddress);
- egressInterface = interfacePtrie.match(
+ egressInterface = interfacePtree.match(
new Prefix(dstIpAddress.getAddress(), 32));
if (egressInterface == null) {
log.warn("No outgoing interface found for {}", dstIpAddress.getHostAddress());
@@ -596,7 +596,7 @@
if (ptree.remove(prefix, update.getRibEntry())) {
/*
- * Only delete flows if an entry was actually removed from the trie.
+ * Only delete flows if an entry was actually removed from the tree.
* If no entry was removed, the <prefix, nexthop> wasn't there so
* it's probably already been removed and we don't need to do anything
*/
@@ -1363,13 +1363,13 @@
@Override
public boolean isInterfaceAddress(InetAddress address) {
- Interface intf = interfacePtrie.match(new Prefix(address.getAddress(), 32));
+ Interface intf = interfacePtree.match(new Prefix(address.getAddress(), 32));
return (intf != null && intf.getIpAddress().equals(address));
}
@Override
public boolean inConnectedNetwork(InetAddress address) {
- Interface intf = interfacePtrie.match(new Prefix(address.getAddress(), 32));
+ Interface intf = interfacePtree.match(new Prefix(address.getAddress(), 32));
return (intf != null && !intf.getIpAddress().equals(address));
}
@@ -1385,7 +1385,7 @@
@Override
public Interface getOutgoingInterface(InetAddress dstIpAddress) {
- return interfacePtrie.match(new Prefix(dstIpAddress.getAddress(), 32));
+ return interfacePtree.match(new Prefix(dstIpAddress.getAddress(), 32));
}
@Override