BUG-2138: Create blueprint wiring for cds shard manager. 95/48795/59
authorJakub Morvay <jmorvay@cisco.com>
Fri, 3 Mar 2017 11:32:17 +0000 (12:32 +0100)
committerJakub Morvay <jmorvay@cisco.com>
Fri, 31 Mar 2017 08:12:04 +0000 (10:12 +0200)
Change-Id: I504c294db111944c8e2047e58c3e1ef1aa81aee8
Signed-off-by: Jakub Morvay <jmorvay@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/pom.xml
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java
opendaylight/md-sal/sal-distributed-datastore/src/main/resources/org/opendaylight/blueprint/clustered-datastore.xml

index d42b346..beb396a 100644 (file)
                 org.opendaylight.controller.cluster.datastore.messages;
                 org.opendaylight.controller.cluster.datastore.persisted;
                 org.opendaylight.controller.cluster.datastore.utils;
+                org.opendaylight.controller.cluster.sharding;
             </Export-Package>
             <Import-Package>
                 !*snappy;
index 6e53a27..9726a98 100644 (file)
@@ -184,8 +184,11 @@ public class DistributedShardedDOMDataTree implements DOMDataTreeService, DOMDat
      * Finally, we need to be sure that default shards for both operational and
      * configuration data stores are up and running and we have distributed
      * shards frontend created for them.
+     *
+     * <p>
+     * This is intended to be invoked by blueprint as initialization method.
      */
-    void init() {
+    public void init() {
         // create our writers to the configuration
         try {
             LOG.debug("{} - starting config shard lookup.",
index d0c8b78..57817ab 100644 (file)
 
   <service ref="distributedEntityOwnershipService" interface="org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipService"
         odl:type="default"/>
+
+  <!-- CDS shard manager -->
+  <bean id="cdsNodeManager" class="org.opendaylight.controller.cluster.sharding.DistributedShardedDOMDataTree"
+          init-method="init">
+    <argument ref="actorSystemProvider"/>
+    <argument ref="operDatastore"/>
+    <argument ref="configDatastore"/>
+  </bean>
+
+  <service ref="cdsNodeManager" odl:type="default">
+    <interfaces>
+      <value>org.opendaylight.mdsal.dom.api.DOMDataTreeShardingService</value>
+      <value>org.opendaylight.mdsal.dom.api.DOMDataTreeService</value>
+      <value>org.opendaylight.controller.cluster.sharding.DistributedShardFactory</value>
+    </interfaces>
+  </service>
+
 </blueprint>
\ No newline at end of file

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.