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 <bean id="actorSystemProps" class="org.opendaylight.controller.cluster.akka.osgi.impl.QuarantinedMonitorActorPropsFactory"
29 factory-method="createProps">
30 <argument ref="blueprintBundleContext" />
33 <bean id="akkaReader" class="org.opendaylight.controller.cluster.common.actor.FileAkkaConfigurationReader"/>
34 <bean id="akkaConfig" class="org.opendaylight.controller.cluster.akka.impl.AkkaConfigFactory"
35 factory-method="createAkkaConfig">
36 <argument ref="akkaReader" />
39 <bean id="actorSystemProvider" class="org.opendaylight.controller.cluster.akka.impl.ActorSystemProviderImpl"
40 destroy-method="close">
41 <argument ref="bundleClassLoader" />
42 <argument ref="actorSystemProps"/>
43 <argument ref="akkaConfig"/>
46 <service ref="actorSystemProvider" interface="org.opendaylight.controller.cluster.ActorSystemProvider"/>
48 <!-- Datastore properties -->
49 <cm:cm-properties id="datastoreProps" persistent-id="org.opendaylight.controller.cluster.datastore"/>
51 <!-- Distributed Config Datastore -->
52 <bean id="datastoreSnapshotRestore" class="org.opendaylight.controller.cluster.datastore.DatastoreSnapshotRestore"
53 factory-method="instance">
54 <argument value="./clustered-datastore-restore"/>
57 <bean id="introspectorConfig" factory-ref="introspectorFactory" factory-method="newInstance">
58 <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="CONFIGURATION"/>
61 <bean id="updaterConfig" class="org.opendaylight.controller.cluster.datastore.DatastoreContextPropertiesUpdater">
62 <cm:managed-properties persistent-id="org.opendaylight.controller.cluster.datastore" update-strategy="component-managed" update-method="update"/>
63 <argument ref="introspectorConfig"/>
64 <argument ref="datastoreProps"/>
67 <bean id="configDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
68 factory-method="createInstance" destroy-method="close">
69 <argument ref="schemaService"/>
71 <bean factory-ref="introspectorConfig" factory-method="getContext" />
73 <argument ref="datastoreSnapshotRestore"/>
74 <argument ref="actorSystemProvider"/>
75 <argument ref="introspectorConfig"/>
76 <argument ref="updaterConfig"/>
79 <service ref="configDatastore" odl:type="distributed-config">
81 <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
85 <!-- Distributed Operational Datastore -->
86 <bean id="fileModuleShardConfigProvider" class="org.opendaylight.controller.cluster.datastore.config.FileModuleShardConfigProvider">
87 <argument value="./configuration/initial/module-shards.conf"/>
88 <argument value="./configuration/initial/modules.conf"/>
91 <bean id="configurationImpl" class="org.opendaylight.controller.cluster.datastore.config.ConfigurationImpl">
92 <argument ref="fileModuleShardConfigProvider"/>
95 <bean id="introspectorOper" factory-ref="introspectorFactory" factory-method="newInstance">
96 <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="OPERATIONAL"/>
99 <bean id="updaterOper" class="org.opendaylight.controller.cluster.datastore.DatastoreContextPropertiesUpdater">
100 <cm:managed-properties persistent-id="org.opendaylight.controller.cluster.datastore" update-strategy="component-managed" update-method="update"/>
101 <argument ref="introspectorOper"/>
102 <argument ref="datastoreProps"/>
105 <bean id="operDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
106 factory-method="createInstance" destroy-method="close">
107 <argument ref="schemaService"/>
109 <bean factory-ref="introspectorOper" factory-method="getContext" />
111 <argument ref="datastoreSnapshotRestore"/>
112 <argument ref="actorSystemProvider"/>
113 <argument ref="introspectorOper"/>
114 <argument ref="updaterOper"/>
115 <argument ref="configurationImpl" />
118 <service ref="operDatastore" odl:type="distributed-operational">
120 <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
124 <!-- Concurrent DOMDataBroker -->
126 <bean id="listenableFutureExecutor" class="org.opendaylight.yangtools.util.concurrent.SpecialExecutors"
127 factory-method="newBlockingBoundedCachedThreadPool">
128 <argument value="${max-data-broker-future-callback-pool-size}"/>
129 <argument value="${max-data-broker-future-callback-queue-size}"/>
130 <argument value="CommitFutures"/>
132 <!-- We should use a more specific class -->
133 <bean factory-ref="operDatastore" factory-method="getClass"/>
137 <bean id="commitStatsTracker" class="org.opendaylight.yangtools.util.DurationStatisticsTracker"
138 factory-method="createConcurrent"/>
140 <bean id="clusteredDOMDataBroker" class="org.opendaylight.controller.cluster.databroker.ConcurrentDOMDataBroker"
141 destroy-method="close">
144 <entry key="CONFIGURATION" value-ref="configDatastore"/>
145 <entry key="OPERATIONAL" value-ref="operDatastore"/>
148 <argument ref="listenableFutureExecutor"/>
149 <argument ref="commitStatsTracker"/>
152 <service ref="clusteredDOMDataBroker" interface="org.opendaylight.mdsal.dom.api.DOMDataBroker"
155 <!-- JMX beans for the data broker -->
157 <bean id="commitStatsMXBean" class="org.opendaylight.controller.cluster.datastore.jmx.mbeans.CommitStatsMXBeanImpl"
158 init-method="register" destroy-method="unregister">
159 <argument ref="commitStatsTracker"/>
160 <argument value="DOMDataBroker"/>
163 <bean id="threadStatsMXBean" class="org.opendaylight.controller.md.sal.common.util.jmx.ThreadExecutorStatsMXBeanImpl"
164 factory-method="create" destroy-method="unregister">
165 <argument ref="listenableFutureExecutor"/>
166 <argument value="CommitFutureExecutorStats"/>
167 <argument value="DOMDataBroker"/>
170 <!-- CDS shard manager -->
171 <bean id="cdsNodeManager" class="org.opendaylight.controller.cluster.sharding.DistributedShardedDOMDataTree"
173 <argument ref="actorSystemProvider"/>
174 <argument ref="operDatastore"/>
175 <argument ref="configDatastore"/>
178 <service ref="cdsNodeManager" odl:type="default">
180 <value>org.opendaylight.mdsal.dom.api.DOMDataTreeShardingService</value>
181 <value>org.opendaylight.mdsal.dom.api.DOMDataTreeService</value>
182 <value>org.opendaylight.controller.cluster.sharding.DistributedShardFactory</value>