Convert FileModuleShardConfigProvider to OSGi DS
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / resources / OSGI-INF / blueprint / clustered-datastore.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
3            xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
4            xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0">
5
6   <cm:property-placeholder persistent-id="org.opendaylight.controller.cluster.datastore.broker" update-strategy="none">
7     <cm:default-properties>
8       <cm:property name="max-data-broker-future-callback-queue-size" value="1000"/>
9       <cm:property name="max-data-broker-future-callback-pool-size" value="20"/>
10     </cm:default-properties>
11   </cm:property-placeholder>
12
13   <odl:static-reference id="schemaService" interface="org.opendaylight.mdsal.dom.api.DOMSchemaService" />
14
15   <!-- Datastore properties -->
16   <reference id="actorSystemProvider" interface="org.opendaylight.controller.cluster.ActorSystemProvider"/>
17   <reference id="introspectorFactory" interface="org.opendaylight.controller.cluster.datastore.DatastoreContextIntrospectorFactory"/>
18   <reference id="datastoreSnapshotRestore" interface="org.opendaylight.controller.cluster.datastore.DatastoreSnapshotRestore"/>
19   <reference id="fileModuleShardConfigProvider" interface="org.opendaylight.controller.cluster.datastore.config.ModuleShardConfigProvider"/>
20
21   <cm:cm-properties id="datastoreProps" persistent-id="org.opendaylight.controller.cluster.datastore"/>
22
23   <!-- Distributed Config Datastore -->
24   <bean id="introspectorConfig" factory-ref="introspectorFactory" factory-method="newInstance">
25     <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="CONFIGURATION"/>
26   </bean>
27
28   <bean id="updaterConfig" class="org.opendaylight.controller.cluster.datastore.DatastoreContextPropertiesUpdater">
29     <cm:managed-properties persistent-id="org.opendaylight.controller.cluster.datastore" update-strategy="component-managed" update-method="update"/>
30     <argument ref="introspectorConfig"/>
31     <argument ref="datastoreProps"/>
32   </bean>
33
34   <bean id="configDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
35           factory-method="createInstance" destroy-method="close">
36     <argument ref="schemaService"/>
37     <argument>
38       <bean factory-ref="introspectorConfig" factory-method="getContext" />
39     </argument>
40     <argument ref="datastoreSnapshotRestore"/>
41     <argument ref="actorSystemProvider"/>
42     <argument ref="introspectorConfig"/>
43     <argument ref="updaterConfig"/>
44   </bean>
45
46   <service ref="configDatastore" odl:type="distributed-config">
47     <interfaces>
48       <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
49     </interfaces>
50   </service>
51
52   <!-- Distributed Operational Datastore -->
53
54   <bean id="configurationImpl" class="org.opendaylight.controller.cluster.datastore.config.ConfigurationImpl">
55     <argument ref="fileModuleShardConfigProvider"/>
56   </bean>
57
58   <bean id="introspectorOper" factory-ref="introspectorFactory" factory-method="newInstance">
59     <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="OPERATIONAL"/>
60   </bean>
61
62   <bean id="updaterOper" class="org.opendaylight.controller.cluster.datastore.DatastoreContextPropertiesUpdater">
63     <cm:managed-properties persistent-id="org.opendaylight.controller.cluster.datastore" update-strategy="component-managed" update-method="update"/>
64     <argument ref="introspectorOper"/>
65     <argument ref="datastoreProps"/>
66   </bean>
67
68   <bean id="operDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
69           factory-method="createInstance" destroy-method="close">
70     <argument ref="schemaService"/>
71     <argument>
72       <bean factory-ref="introspectorOper" factory-method="getContext" />
73     </argument>
74     <argument ref="datastoreSnapshotRestore"/>
75     <argument ref="actorSystemProvider"/>
76     <argument ref="introspectorOper"/>
77     <argument ref="updaterOper"/>
78     <argument ref="configurationImpl" />
79   </bean>
80
81   <service ref="operDatastore" odl:type="distributed-operational">
82     <interfaces>
83       <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
84     </interfaces>
85   </service>
86
87   <!-- Concurrent DOMDataBroker -->
88
89   <bean id="listenableFutureExecutor" class="org.opendaylight.yangtools.util.concurrent.SpecialExecutors"
90           factory-method="newBlockingBoundedCachedThreadPool">
91     <argument value="${max-data-broker-future-callback-pool-size}"/>
92     <argument value="${max-data-broker-future-callback-queue-size}"/>
93     <argument value="CommitFutures"/>
94     <argument>
95     <!-- We should use a more specific class -->
96       <bean factory-ref="operDatastore" factory-method="getClass"/>
97     </argument>
98   </bean>
99
100   <bean id="commitStatsTracker" class="org.opendaylight.yangtools.util.DurationStatisticsTracker"
101           factory-method="createConcurrent"/>
102
103   <bean id="clusteredDOMDataBroker" class="org.opendaylight.controller.cluster.databroker.ConcurrentDOMDataBroker"
104           destroy-method="close">
105     <argument>
106       <map>
107         <entry key="CONFIGURATION" value-ref="configDatastore"/>
108         <entry key="OPERATIONAL" value-ref="operDatastore"/>
109       </map>
110     </argument>
111     <argument ref="listenableFutureExecutor"/>
112     <argument ref="commitStatsTracker"/>
113   </bean>
114
115   <service ref="clusteredDOMDataBroker" interface="org.opendaylight.mdsal.dom.api.DOMDataBroker"
116           odl:type="default"/>
117
118   <!-- JMX beans for the data broker -->
119
120   <bean id="commitStatsMXBean" class="org.opendaylight.controller.cluster.datastore.jmx.mbeans.CommitStatsMXBeanImpl"
121           init-method="register" destroy-method="unregister">
122     <argument ref="commitStatsTracker"/>
123     <argument value="DOMDataBroker"/>
124   </bean>
125
126   <bean id="threadStatsMXBean" class="org.opendaylight.controller.md.sal.common.util.jmx.ThreadExecutorStatsMXBeanImpl"
127           factory-method="create" destroy-method="unregister">
128     <argument ref="listenableFutureExecutor"/>
129     <argument value="CommitFutureExecutorStats"/>
130     <argument value="DOMDataBroker"/>
131   </bean>
132
133   <!-- CDS shard manager -->
134   <bean id="cdsNodeManager" class="org.opendaylight.controller.cluster.sharding.DistributedShardedDOMDataTree"
135           init-method="init">
136     <argument ref="actorSystemProvider"/>
137     <argument ref="operDatastore"/>
138     <argument ref="configDatastore"/>
139   </bean>
140
141   <service ref="cdsNodeManager" odl:type="default">
142     <interfaces>
143       <value>org.opendaylight.mdsal.dom.api.DOMDataTreeShardingService</value>
144       <value>org.opendaylight.mdsal.dom.api.DOMDataTreeService</value>
145       <value>org.opendaylight.controller.cluster.sharding.DistributedShardFactory</value>
146     </interfaces>
147   </service>
148
149 </blueprint>

©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.