Convert DatastoreSnapshotRestore 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
20   <cm:cm-properties id="datastoreProps" persistent-id="org.opendaylight.controller.cluster.datastore"/>
21
22   <!-- Distributed Config Datastore -->
23   <bean id="introspectorConfig" factory-ref="introspectorFactory" factory-method="newInstance">
24     <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="CONFIGURATION"/>
25   </bean>
26
27   <bean id="updaterConfig" class="org.opendaylight.controller.cluster.datastore.DatastoreContextPropertiesUpdater">
28     <cm:managed-properties persistent-id="org.opendaylight.controller.cluster.datastore" update-strategy="component-managed" update-method="update"/>
29     <argument ref="introspectorConfig"/>
30     <argument ref="datastoreProps"/>
31   </bean>
32
33   <bean id="configDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
34           factory-method="createInstance" destroy-method="close">
35     <argument ref="schemaService"/>
36     <argument>
37       <bean factory-ref="introspectorConfig" factory-method="getContext" />
38     </argument>
39     <argument ref="datastoreSnapshotRestore"/>
40     <argument ref="actorSystemProvider"/>
41     <argument ref="introspectorConfig"/>
42     <argument ref="updaterConfig"/>
43   </bean>
44
45   <service ref="configDatastore" odl:type="distributed-config">
46     <interfaces>
47       <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
48     </interfaces>
49   </service>
50
51   <!-- Distributed Operational Datastore -->
52   <bean id="fileModuleShardConfigProvider" class="org.opendaylight.controller.cluster.datastore.config.FileModuleShardConfigProvider">
53     <argument value="./configuration/initial/module-shards.conf"/>
54     <argument value="./configuration/initial/modules.conf"/>
55   </bean>
56
57   <bean id="configurationImpl" class="org.opendaylight.controller.cluster.datastore.config.ConfigurationImpl">
58     <argument ref="fileModuleShardConfigProvider"/>
59   </bean>
60
61   <bean id="introspectorOper" factory-ref="introspectorFactory" factory-method="newInstance">
62     <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="OPERATIONAL"/>
63   </bean>
64
65   <bean id="updaterOper" class="org.opendaylight.controller.cluster.datastore.DatastoreContextPropertiesUpdater">
66     <cm:managed-properties persistent-id="org.opendaylight.controller.cluster.datastore" update-strategy="component-managed" update-method="update"/>
67     <argument ref="introspectorOper"/>
68     <argument ref="datastoreProps"/>
69   </bean>
70
71   <bean id="operDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
72           factory-method="createInstance" destroy-method="close">
73     <argument ref="schemaService"/>
74     <argument>
75       <bean factory-ref="introspectorOper" factory-method="getContext" />
76     </argument>
77     <argument ref="datastoreSnapshotRestore"/>
78     <argument ref="actorSystemProvider"/>
79     <argument ref="introspectorOper"/>
80     <argument ref="updaterOper"/>
81     <argument ref="configurationImpl" />
82   </bean>
83
84   <service ref="operDatastore" odl:type="distributed-operational">
85     <interfaces>
86       <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
87     </interfaces>
88   </service>
89
90   <!-- Concurrent DOMDataBroker -->
91
92   <bean id="listenableFutureExecutor" class="org.opendaylight.yangtools.util.concurrent.SpecialExecutors"
93           factory-method="newBlockingBoundedCachedThreadPool">
94     <argument value="${max-data-broker-future-callback-pool-size}"/>
95     <argument value="${max-data-broker-future-callback-queue-size}"/>
96     <argument value="CommitFutures"/>
97     <argument>
98     <!-- We should use a more specific class -->
99       <bean factory-ref="operDatastore" factory-method="getClass"/>
100     </argument>
101   </bean>
102
103   <bean id="commitStatsTracker" class="org.opendaylight.yangtools.util.DurationStatisticsTracker"
104           factory-method="createConcurrent"/>
105
106   <bean id="clusteredDOMDataBroker" class="org.opendaylight.controller.cluster.databroker.ConcurrentDOMDataBroker"
107           destroy-method="close">
108     <argument>
109       <map>
110         <entry key="CONFIGURATION" value-ref="configDatastore"/>
111         <entry key="OPERATIONAL" value-ref="operDatastore"/>
112       </map>
113     </argument>
114     <argument ref="listenableFutureExecutor"/>
115     <argument ref="commitStatsTracker"/>
116   </bean>
117
118   <service ref="clusteredDOMDataBroker" interface="org.opendaylight.mdsal.dom.api.DOMDataBroker"
119           odl:type="default"/>
120
121   <!-- JMX beans for the data broker -->
122
123   <bean id="commitStatsMXBean" class="org.opendaylight.controller.cluster.datastore.jmx.mbeans.CommitStatsMXBeanImpl"
124           init-method="register" destroy-method="unregister">
125     <argument ref="commitStatsTracker"/>
126     <argument value="DOMDataBroker"/>
127   </bean>
128
129   <bean id="threadStatsMXBean" class="org.opendaylight.controller.md.sal.common.util.jmx.ThreadExecutorStatsMXBeanImpl"
130           factory-method="create" destroy-method="unregister">
131     <argument ref="listenableFutureExecutor"/>
132     <argument value="CommitFutureExecutorStats"/>
133     <argument value="DOMDataBroker"/>
134   </bean>
135
136   <!-- CDS shard manager -->
137   <bean id="cdsNodeManager" class="org.opendaylight.controller.cluster.sharding.DistributedShardedDOMDataTree"
138           init-method="init">
139     <argument ref="actorSystemProvider"/>
140     <argument ref="operDatastore"/>
141     <argument ref="configDatastore"/>
142   </bean>
143
144   <service ref="cdsNodeManager" odl:type="default">
145     <interfaces>
146       <value>org.opendaylight.mdsal.dom.api.DOMDataTreeShardingService</value>
147       <value>org.opendaylight.mdsal.dom.api.DOMDataTreeService</value>
148       <value>org.opendaylight.controller.cluster.sharding.DistributedShardFactory</value>
149     </interfaces>
150   </service>
151
152 </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.