4bc117a5c75f9fdf06dadab3a3f4e3128c39cd94
[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   </bean>
128
129   <bean id="commitStatsTracker" class="org.opendaylight.yangtools.util.DurationStatisticsTracker"
130           factory-method="createConcurrent"/>
131
132   <bean id="clusteredDOMDataBroker" class="org.opendaylight.controller.cluster.databroker.ConcurrentDOMDataBroker"
133           destroy-method="close">
134     <argument>
135       <map>
136         <entry key="CONFIGURATION" value-ref="configDatastore"/>
137         <entry key="OPERATIONAL" value-ref="operDatastore"/>
138       </map>
139     </argument>
140     <argument ref="listenableFutureExecutor"/>
141     <argument ref="commitStatsTracker"/>
142   </bean>
143
144   <service ref="clusteredDOMDataBroker" interface="org.opendaylight.controller.md.sal.dom.api.DOMDataBroker"
145           odl:type="default"/>
146
147   <!-- JMX beans for the data broker -->
148
149   <bean id="commitStatsMXBean" class="org.opendaylight.controller.md.sal.dom.broker.impl.jmx.CommitStatsMXBeanImpl"
150           init-method="register" destroy-method="unregister">
151     <argument ref="commitStatsTracker"/>
152     <argument value="DOMDataBroker"/>
153   </bean>
154
155   <bean id="threadStatsMXBean" class="org.opendaylight.controller.md.sal.common.util.jmx.ThreadExecutorStatsMXBeanImpl"
156           factory-method="create" destroy-method="unregister">
157     <argument ref="listenableFutureExecutor"/>
158     <argument value="CommitFutureExecutorStats"/>
159     <argument value="DOMDataBroker"/>
160     <argument><null/></argument>
161   </bean>
162
163   <!-- Distributed EntityOwnershipService -->
164   <cm:cm-properties id="strategiesProps" persistent-id="org.opendaylight.controller.cluster.entity.owner.selection.strategies" />
165
166   <bean id="selectionStrategyConfig" class="org.opendaylight.controller.cluster.datastore.entityownership.selectionstrategy.EntityOwnerSelectionStrategyConfigReader"
167           factory-method="loadStrategyWithConfig">
168     <argument ref="strategiesProps"/>
169   </bean>
170
171   <bean id="distributedEntityOwnershipService" class="org.opendaylight.controller.cluster.datastore.entityownership.DistributedEntityOwnershipService"
172           factory-method="start" destroy-method="close">
173     <argument>
174       <bean factory-ref="operDatastore" factory-method="getActorContext"/>
175     </argument>
176     <argument ref="selectionStrategyConfig"/>
177   </bean>
178
179   <service ref="distributedEntityOwnershipService" interface="org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipService"
180         odl:type="default"/>
181
182   <!-- CDS shard manager -->
183   <bean id="cdsNodeManager" class="org.opendaylight.controller.cluster.sharding.DistributedShardedDOMDataTree"
184           init-method="init">
185     <argument ref="actorSystemProvider"/>
186     <argument ref="operDatastore"/>
187     <argument ref="configDatastore"/>
188   </bean>
189
190   <service ref="cdsNodeManager" odl:type="default">
191     <interfaces>
192       <value>org.opendaylight.mdsal.dom.api.DOMDataTreeShardingService</value>
193       <value>org.opendaylight.mdsal.dom.api.DOMDataTreeService</value>
194       <value>org.opendaylight.controller.cluster.sharding.DistributedShardFactory</value>
195     </interfaces>
196   </service>
197
198 </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.