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">
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>
13 <odl:static-reference id="schemaService" interface="org.opendaylight.mdsal.dom.api.DOMSchemaService" />
15 <reference id="bindingSerializer" interface="org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer"/>
17 <bean id="introspectorFactory" class="org.opendaylight.controller.cluster.datastore.DatastoreContextIntrospectorFactory">
18 <argument ref="bindingSerializer"/>
21 <!-- ActorSystemProvider -->
23 <bean id="bundleClassLoader" class="org.opendaylight.controller.cluster.akka.osgi.impl.BundleClassLoaderFactory"
24 factory-method="createClassLoader">
25 <argument ref="blueprintBundleContext" />
28 <reference id="akkaReader" interface="org.opendaylight.controller.cluster.common.actor.AkkaConfigurationReader"/>
30 <bean id="akkaConfig" class="org.opendaylight.controller.cluster.akka.impl.AkkaConfigFactory"
31 factory-method="createAkkaConfig">
32 <argument ref="akkaReader" />
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"/>
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"/>
48 <service ref="actorSystemProvider" interface="org.opendaylight.controller.cluster.ActorSystemProvider"/>
50 <!-- Datastore properties -->
51 <cm:cm-properties id="datastoreProps" persistent-id="org.opendaylight.controller.cluster.datastore"/>
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"/>
59 <bean id="introspectorConfig" factory-ref="introspectorFactory" factory-method="newInstance">
60 <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="CONFIGURATION"/>
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"/>
69 <bean id="configDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
70 factory-method="createInstance" destroy-method="close">
71 <argument ref="schemaService"/>
73 <bean factory-ref="introspectorConfig" factory-method="getContext" />
75 <argument ref="datastoreSnapshotRestore"/>
76 <argument ref="actorSystemProvider"/>
77 <argument ref="introspectorConfig"/>
78 <argument ref="updaterConfig"/>
81 <service ref="configDatastore" odl:type="distributed-config">
83 <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
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"/>
93 <bean id="configurationImpl" class="org.opendaylight.controller.cluster.datastore.config.ConfigurationImpl">
94 <argument ref="fileModuleShardConfigProvider"/>
97 <bean id="introspectorOper" factory-ref="introspectorFactory" factory-method="newInstance">
98 <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="OPERATIONAL"/>
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"/>
107 <bean id="operDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
108 factory-method="createInstance" destroy-method="close">
109 <argument ref="schemaService"/>
111 <bean factory-ref="introspectorOper" factory-method="getContext" />
113 <argument ref="datastoreSnapshotRestore"/>
114 <argument ref="actorSystemProvider"/>
115 <argument ref="introspectorOper"/>
116 <argument ref="updaterOper"/>
117 <argument ref="configurationImpl" />
120 <service ref="operDatastore" odl:type="distributed-operational">
122 <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
126 <!-- Concurrent DOMDataBroker -->
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"/>
134 <!-- We should use a more specific class -->
135 <bean factory-ref="operDatastore" factory-method="getClass"/>
139 <bean id="commitStatsTracker" class="org.opendaylight.yangtools.util.DurationStatisticsTracker"
140 factory-method="createConcurrent"/>
142 <bean id="clusteredDOMDataBroker" class="org.opendaylight.controller.cluster.databroker.ConcurrentDOMDataBroker"
143 destroy-method="close">
146 <entry key="CONFIGURATION" value-ref="configDatastore"/>
147 <entry key="OPERATIONAL" value-ref="operDatastore"/>
150 <argument ref="listenableFutureExecutor"/>
151 <argument ref="commitStatsTracker"/>
154 <service ref="clusteredDOMDataBroker" interface="org.opendaylight.mdsal.dom.api.DOMDataBroker"
157 <!-- JMX beans for the data broker -->
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"/>
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"/>
172 <!-- CDS shard manager -->
173 <bean id="cdsNodeManager" class="org.opendaylight.controller.cluster.sharding.DistributedShardedDOMDataTree"
175 <argument ref="actorSystemProvider"/>
176 <argument ref="operDatastore"/>
177 <argument ref="configDatastore"/>
180 <service ref="cdsNodeManager" odl:type="default">
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>