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