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