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="akkaReader" class="org.opendaylight.controller.cluster.common.actor.FileAkkaConfigurationReader"/>
29 <bean id="akkaConfig" class="org.opendaylight.controller.cluster.akka.impl.AkkaConfigFactory"
30 factory-method="createAkkaConfig">
31 <argument ref="akkaReader" />
34 <bean id="actorSystemProps" class="org.opendaylight.controller.cluster.akka.osgi.impl.QuarantinedMonitorActorPropsFactory"
35 factory-method="createProps">
36 <argument ref="blueprintBundleContext" />
37 <argument ref="akkaConfig"/>
40 <bean id="actorSystemProvider" class="org.opendaylight.controller.cluster.akka.impl.ActorSystemProviderImpl"
41 destroy-method="close">
42 <argument ref="bundleClassLoader" />
43 <argument ref="actorSystemProps"/>
44 <argument ref="akkaConfig"/>
47 <service ref="actorSystemProvider" interface="org.opendaylight.controller.cluster.ActorSystemProvider"/>
49 <!-- Datastore properties -->
50 <cm:cm-properties id="datastoreProps" persistent-id="org.opendaylight.controller.cluster.datastore"/>
52 <!-- Distributed Config Datastore -->
53 <bean id="datastoreSnapshotRestore" class="org.opendaylight.controller.cluster.datastore.DatastoreSnapshotRestore"
54 factory-method="instance">
55 <argument value="./clustered-datastore-restore"/>
58 <bean id="introspectorConfig" factory-ref="introspectorFactory" factory-method="newInstance">
59 <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="CONFIGURATION"/>
62 <bean id="updaterConfig" class="org.opendaylight.controller.cluster.datastore.DatastoreContextPropertiesUpdater">
63 <cm:managed-properties persistent-id="org.opendaylight.controller.cluster.datastore" update-strategy="component-managed" update-method="update"/>
64 <argument ref="introspectorConfig"/>
65 <argument ref="datastoreProps"/>
68 <bean id="configDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
69 factory-method="createInstance" destroy-method="close">
70 <argument ref="schemaService"/>
72 <bean factory-ref="introspectorConfig" factory-method="getContext" />
74 <argument ref="datastoreSnapshotRestore"/>
75 <argument ref="actorSystemProvider"/>
76 <argument ref="introspectorConfig"/>
77 <argument ref="updaterConfig"/>
80 <service ref="configDatastore" odl:type="distributed-config">
82 <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
86 <!-- Distributed Operational Datastore -->
87 <bean id="fileModuleShardConfigProvider" class="org.opendaylight.controller.cluster.datastore.config.FileModuleShardConfigProvider">
88 <argument value="./configuration/initial/module-shards.conf"/>
89 <argument value="./configuration/initial/modules.conf"/>
92 <bean id="configurationImpl" class="org.opendaylight.controller.cluster.datastore.config.ConfigurationImpl">
93 <argument ref="fileModuleShardConfigProvider"/>
96 <bean id="introspectorOper" factory-ref="introspectorFactory" factory-method="newInstance">
97 <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="OPERATIONAL"/>
100 <bean id="updaterOper" class="org.opendaylight.controller.cluster.datastore.DatastoreContextPropertiesUpdater">
101 <cm:managed-properties persistent-id="org.opendaylight.controller.cluster.datastore" update-strategy="component-managed" update-method="update"/>
102 <argument ref="introspectorOper"/>
103 <argument ref="datastoreProps"/>
106 <bean id="operDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
107 factory-method="createInstance" destroy-method="close">
108 <argument ref="schemaService"/>
110 <bean factory-ref="introspectorOper" factory-method="getContext" />
112 <argument ref="datastoreSnapshotRestore"/>
113 <argument ref="actorSystemProvider"/>
114 <argument ref="introspectorOper"/>
115 <argument ref="updaterOper"/>
116 <argument ref="configurationImpl" />
119 <service ref="operDatastore" odl:type="distributed-operational">
121 <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
125 <!-- Concurrent DOMDataBroker -->
127 <bean id="listenableFutureExecutor" class="org.opendaylight.yangtools.util.concurrent.SpecialExecutors"
128 factory-method="newBlockingBoundedCachedThreadPool">
129 <argument value="${max-data-broker-future-callback-pool-size}"/>
130 <argument value="${max-data-broker-future-callback-queue-size}"/>
131 <argument value="CommitFutures"/>
133 <!-- We should use a more specific class -->
134 <bean factory-ref="operDatastore" factory-method="getClass"/>
138 <bean id="commitStatsTracker" class="org.opendaylight.yangtools.util.DurationStatisticsTracker"
139 factory-method="createConcurrent"/>
141 <bean id="clusteredDOMDataBroker" class="org.opendaylight.controller.cluster.databroker.ConcurrentDOMDataBroker"
142 destroy-method="close">
145 <entry key="CONFIGURATION" value-ref="configDatastore"/>
146 <entry key="OPERATIONAL" value-ref="operDatastore"/>
149 <argument ref="listenableFutureExecutor"/>
150 <argument ref="commitStatsTracker"/>
153 <service ref="clusteredDOMDataBroker" interface="org.opendaylight.mdsal.dom.api.DOMDataBroker"
156 <!-- JMX beans for the data broker -->
158 <bean id="commitStatsMXBean" class="org.opendaylight.controller.cluster.datastore.jmx.mbeans.CommitStatsMXBeanImpl"
159 init-method="register" destroy-method="unregister">
160 <argument ref="commitStatsTracker"/>
161 <argument value="DOMDataBroker"/>
164 <bean id="threadStatsMXBean" class="org.opendaylight.controller.md.sal.common.util.jmx.ThreadExecutorStatsMXBeanImpl"
165 factory-method="create" destroy-method="unregister">
166 <argument ref="listenableFutureExecutor"/>
167 <argument value="CommitFutureExecutorStats"/>
168 <argument value="DOMDataBroker"/>
171 <!-- CDS shard manager -->
172 <bean id="cdsNodeManager" class="org.opendaylight.controller.cluster.sharding.DistributedShardedDOMDataTree"
174 <argument ref="actorSystemProvider"/>
175 <argument ref="operDatastore"/>
176 <argument ref="configDatastore"/>
179 <service ref="cdsNodeManager" odl:type="default">
181 <value>org.opendaylight.mdsal.dom.api.DOMDataTreeShardingService</value>
182 <value>org.opendaylight.mdsal.dom.api.DOMDataTreeService</value>
183 <value>org.opendaylight.controller.cluster.sharding.DistributedShardFactory</value>