Implement distributed route store
Route store implementation can be selected by component config.
LocalRouteStore will be used by default.
Change-Id: I9afb8356a157f6ff02497bee8e3d70b3c1513850
diff --git a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/LocalRouteStore.java b/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/LocalRouteStore.java
index 78d1610..991c239 100644
--- a/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/LocalRouteStore.java
+++ b/incubator/store/src/main/java/org/onosproject/incubator/store/routing/impl/LocalRouteStore.java
@@ -24,9 +24,6 @@
import com.googlecode.concurrenttrees.radix.node.concrete.DefaultByteArrayNodeFactory;
import com.googlecode.concurrenttrees.radixinverted.ConcurrentInvertedRadixTree;
import com.googlecode.concurrenttrees.radixinverted.InvertedRadixTree;
-import org.apache.felix.scr.annotations.Activate;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Service;
import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
import org.onosproject.incubator.net.routing.NextHopData;
@@ -54,8 +51,6 @@
/**
* Route store based on in-memory storage.
*/
-@Service
-@Component
public class LocalRouteStore extends AbstractStore<RouteEvent, RouteStoreDelegate>
implements RouteStore {
@@ -67,12 +62,23 @@
private Map<IpAddress, NextHopData> nextHops = new ConcurrentHashMap<>();
- @Activate
+ /**
+ * Sets up local route store.
+ */
public void activate() {
routeTables = new ConcurrentHashMap<>();
routeTables.put(IPV4, new RouteTable());
routeTables.put(IPV6, new RouteTable());
+
+ log.info("Started");
+ }
+
+ /**
+ * Cleans up local route store. Currently nothing is done here.
+ */
+ public void deactivate() {
+ log.info("Stopped");
}
@Override