Replaced our old Patricia tree with Google's concurrent radix tree
This required some changes to the Prefix class to store a binary string
representation of the prefix to use as a key in the radix tree.
Also unrelated, bounds checking of the Prefix class has been improved and some
Prefix unit tests have been added.
Change-Id: I56f5b69346801ec70535ed470ae064b1fdf8cfdf
diff --git a/src/main/java/net/onrc/onos/apps/sdnip/ISdnIpService.java b/src/main/java/net/onrc/onos/apps/sdnip/ISdnIpService.java
index 21ee3d3..6189aa7 100644
--- a/src/main/java/net/onrc/onos/apps/sdnip/ISdnIpService.java
+++ b/src/main/java/net/onrc/onos/apps/sdnip/ISdnIpService.java
@@ -2,6 +2,8 @@
import net.floodlightcontroller.core.module.IFloodlightService;
+import com.googlecode.concurrenttrees.radix.RadixTree;
+
/**
* The API exported by the main SDN-IP class. This is the interface between the
* REST handlers and the SDN-IP module.
@@ -9,13 +11,14 @@
public interface ISdnIpService extends IFloodlightService {
/**
- * Gets a reference to SDN-IP's PATRICIA tree which stores the route table.
+ * Gets a reference to SDN-IP's radix tree which stores the route table
+ * learnt through BGP.
*
* XXX This is a poor API because it exposes internal state of SDN-IP.
*
- * @return the PATRICIA tree.
+ * @return the radix tree
*/
- public IPatriciaTree<RibEntry> getPtree();
+ public RadixTree<RibEntry> getPtree();
/**
* Gets the IP address of REST server on the BGPd side. This is used to