Turn FileAkkaConfigurationReader into a component
[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   <reference id="bindingSerializer" interface="org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer"/>
16
17   <bean id="introspectorFactory" class="org.opendaylight.controller.cluster.datastore.DatastoreContextIntrospectorFactory">
18     <argument ref="bindingSerializer"/>
19   </bean>
20
21   <!-- ActorSystemProvider -->
22
23   <bean id="bundleClassLoader" class="org.opendaylight.controller.cluster.akka.osgi.impl.BundleClassLoaderFactory"
24           factory-method="createClassLoader">
25     <argument ref="blueprintBundleContext" />
26   </bean>
27
28   <reference id="akkaReader" interface="org.opendaylight.controller.cluster.common.actor.AkkaConfigurationReader"/>
29
30   <bean id="akkaConfig" class="org.opendaylight.controller.cluster.akka.impl.AkkaConfigFactory"
31           factory-method="createAkkaConfig">
32     <argument ref="akkaReader" />
33   </bean>
34
35   <bean id="actorSystemProps" class="org.opendaylight.controller.cluster.akka.osgi.impl.QuarantinedMonitorActorPropsFactory"
36         factory-method="createProps">
37     <argument ref="blueprintBundleContext" />
38     <argument ref="akkaConfig"/>
39   </bean>
40
41   <bean id="actorSystemProvider" class="org.opendaylight.controller.cluster.akka.impl.ActorSystemProviderImpl"
42           destroy-method="close">
43     <argument ref="bundleClassLoader" />
44     <argument ref="actorSystemProps"/>
45     <argument ref="akkaConfig"/>
46   </bean>
47
48   <service ref="actorSystemProvider" interface="org.opendaylight.controller.cluster.ActorSystemProvider"/>
49
50   <!-- Datastore properties -->
51   <cm:cm-properties id="datastoreProps" persistent-id="org.opendaylight.controller.cluster.datastore"/>
52
53   <!-- Distributed Config Datastore -->
54   <bean id="datastoreSnapshotRestore" class="org.opendaylight.controller.cluster.datastore.DatastoreSnapshotRestore"
55           factory-method="instance">
56     <argument value="./clustered-datastore-restore"/>
57   </bean>
58
59   <bean id="introspectorConfig" factory-ref="introspectorFactory" factory-method="newInstance">
60     <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="CONFIGURATION"/>
61   </bean>
62
63   <bean id="updaterConfig" class="org.opendaylight.controller.cluster.datastore.DatastoreContextPropertiesUpdater">
64     <cm:managed-properties persistent-id="org.opendaylight.controller.cluster.datastore" update-strategy="component-managed" update-method="update"/>
65     <argument ref="introspectorConfig"/>
66     <argument ref="datastoreProps"/>
67   </bean>
68
69   <bean id="configDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
70           factory-method="createInstance" destroy-method="close">
71     <argument ref="schemaService"/>
72     <argument>
73       <bean factory-ref="introspectorConfig" factory-method="getContext" />
74     </argument>
75     <argument ref="datastoreSnapshotRestore"/>
76     <argument ref="actorSystemProvider"/>
77     <argument ref="introspectorConfig"/>
78     <argument ref="updaterConfig"/>
79   </bean>
80
81   <service ref="configDatastore" odl:type="distributed-config">
82     <interfaces>
83       <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
84     </interfaces>
85   </service>
86
87   <!-- Distributed Operational Datastore -->
88   <bean id="fileModuleShardConfigProvider" class="org.opendaylight.controller.cluster.datastore.config.FileModuleShardConfigProvider">
89     <argument value="./configuration/initial/module-shards.conf"/>
90     <argument value="./configuration/initial/modules.conf"/>
91   </bean>
92
93   <bean id="configurationImpl" class="org.opendaylight.controller.cluster.datastore.config.ConfigurationImpl">
94     <argument ref="fileModuleShardConfigProvider"/>
95   </bean>
96
97   <bean id="introspectorOper" factory-ref="introspectorFactory" factory-method="newInstance">
98     <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="OPERATIONAL"/>
99   </bean>
100
101   <bean id="updaterOper" class="org.opendaylight.controller.cluster.datastore.DatastoreContextPropertiesUpdater">
102     <cm:managed-properties persistent-id="org.opendaylight.controller.cluster.datastore" update-strategy="component-managed" update-method="update"/>
103     <argument ref="introspectorOper"/>
104     <argument ref="datastoreProps"/>
105   </bean>
106
107   <bean id="operDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
108           factory-method="createInstance" destroy-method="close">
109     <argument ref="schemaService"/>
110     <argument>
111       <bean factory-ref="introspectorOper" factory-method="getContext" />
112     </argument>
113     <argument ref="datastoreSnapshotRestore"/>
114     <argument ref="actorSystemProvider"/>
115     <argument ref="introspectorOper"/>
116     <argument ref="updaterOper"/>
117     <argument ref="configurationImpl" />
118   </bean>
119
120   <service ref="operDatastore" odl:type="distributed-operational">
121     <interfaces>
122       <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
123     </interfaces>
124   </service>
125
126   <!-- Concurrent DOMDataBroker -->
127
128   <bean id="listenableFutureExecutor" class="org.opendaylight.yangtools.util.concurrent.SpecialExecutors"
129           factory-method="newBlockingBoundedCachedThreadPool">
130     <argument value="${max-data-broker-future-callback-pool-size}"/>
131     <argument value="${max-data-broker-future-callback-queue-size}"/>
132     <argument value="CommitFutures"/>
133     <argument>
134     <!-- We should use a more specific class -->
135       <bean factory-ref="operDatastore" factory-method="getClass"/>
136     </argument>
137   </bean>
138
139   <bean id="commitStatsTracker" class="org.opendaylight.yangtools.util.DurationStatisticsTracker"
140           factory-method="createConcurrent"/>
141
142   <bean id="clusteredDOMDataBroker" class="org.opendaylight.controller.cluster.databroker.ConcurrentDOMDataBroker"
143           destroy-method="close">
144     <argument>
145       <map>
146         <entry key="CONFIGURATION" value-ref="configDatastore"/>
147         <entry key="OPERATIONAL" value-ref="operDatastore"/>
148       </map>
149     </argument>
150     <argument ref="listenableFutureExecutor"/>
151     <argument ref="commitStatsTracker"/>
152   </bean>
153
154   <service ref="clusteredDOMDataBroker" interface="org.opendaylight.mdsal.dom.api.DOMDataBroker"
155           odl:type="default"/>
156
157   <!-- JMX beans for the data broker -->
158
159   <bean id="commitStatsMXBean" class="org.opendaylight.controller.cluster.datastore.jmx.mbeans.CommitStatsMXBeanImpl"
160           init-method="register" destroy-method="unregister">
161     <argument ref="commitStatsTracker"/>
162     <argument value="DOMDataBroker"/>
163   </bean>
164
165   <bean id="threadStatsMXBean" class="org.opendaylight.controller.md.sal.common.util.jmx.ThreadExecutorStatsMXBeanImpl"
166           factory-method="create" destroy-method="unregister">
167     <argument ref="listenableFutureExecutor"/>
168     <argument value="CommitFutureExecutorStats"/>
169     <argument value="DOMDataBroker"/>
170   </bean>
171
172   <!-- CDS shard manager -->
173   <bean id="cdsNodeManager" class="org.opendaylight.controller.cluster.sharding.DistributedShardedDOMDataTree"
174           init-method="init">
175     <argument ref="actorSystemProvider"/>
176     <argument ref="operDatastore"/>
177     <argument ref="configDatastore"/>
178   </bean>
179
180   <service ref="cdsNodeManager" odl:type="default">
181     <interfaces>
182       <value>org.opendaylight.mdsal.dom.api.DOMDataTreeShardingService</value>
183       <value>org.opendaylight.mdsal.dom.api.DOMDataTreeService</value>
184       <value>org.opendaylight.controller.cluster.sharding.DistributedShardFactory</value>
185     </interfaces>
186   </service>
187
188 </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.