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 <!-- Datastore properties -->
22 <reference id="actorSystemProvider" interface="org.opendaylight.controller.cluster.ActorSystemProvider"/>
24 <cm:cm-properties id="datastoreProps" persistent-id="org.opendaylight.controller.cluster.datastore"/>
26 <!-- Distributed Config Datastore -->
27 <bean id="datastoreSnapshotRestore" class="org.opendaylight.controller.cluster.datastore.DatastoreSnapshotRestore"
28 factory-method="instance">
29 <argument value="./clustered-datastore-restore"/>
32 <bean id="introspectorConfig" factory-ref="introspectorFactory" factory-method="newInstance">
33 <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="CONFIGURATION"/>
36 <bean id="updaterConfig" class="org.opendaylight.controller.cluster.datastore.DatastoreContextPropertiesUpdater">
37 <cm:managed-properties persistent-id="org.opendaylight.controller.cluster.datastore" update-strategy="component-managed" update-method="update"/>
38 <argument ref="introspectorConfig"/>
39 <argument ref="datastoreProps"/>
42 <bean id="configDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
43 factory-method="createInstance" destroy-method="close">
44 <argument ref="schemaService"/>
46 <bean factory-ref="introspectorConfig" factory-method="getContext" />
48 <argument ref="datastoreSnapshotRestore"/>
49 <argument ref="actorSystemProvider"/>
50 <argument ref="introspectorConfig"/>
51 <argument ref="updaterConfig"/>
54 <service ref="configDatastore" odl:type="distributed-config">
56 <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
60 <!-- Distributed Operational Datastore -->
61 <bean id="fileModuleShardConfigProvider" class="org.opendaylight.controller.cluster.datastore.config.FileModuleShardConfigProvider">
62 <argument value="./configuration/initial/module-shards.conf"/>
63 <argument value="./configuration/initial/modules.conf"/>
66 <bean id="configurationImpl" class="org.opendaylight.controller.cluster.datastore.config.ConfigurationImpl">
67 <argument ref="fileModuleShardConfigProvider"/>
70 <bean id="introspectorOper" factory-ref="introspectorFactory" factory-method="newInstance">
71 <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="OPERATIONAL"/>
74 <bean id="updaterOper" class="org.opendaylight.controller.cluster.datastore.DatastoreContextPropertiesUpdater">
75 <cm:managed-properties persistent-id="org.opendaylight.controller.cluster.datastore" update-strategy="component-managed" update-method="update"/>
76 <argument ref="introspectorOper"/>
77 <argument ref="datastoreProps"/>
80 <bean id="operDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
81 factory-method="createInstance" destroy-method="close">
82 <argument ref="schemaService"/>
84 <bean factory-ref="introspectorOper" factory-method="getContext" />
86 <argument ref="datastoreSnapshotRestore"/>
87 <argument ref="actorSystemProvider"/>
88 <argument ref="introspectorOper"/>
89 <argument ref="updaterOper"/>
90 <argument ref="configurationImpl" />
93 <service ref="operDatastore" odl:type="distributed-operational">
95 <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
99 <!-- Concurrent DOMDataBroker -->
101 <bean id="listenableFutureExecutor" class="org.opendaylight.yangtools.util.concurrent.SpecialExecutors"
102 factory-method="newBlockingBoundedCachedThreadPool">
103 <argument value="${max-data-broker-future-callback-pool-size}"/>
104 <argument value="${max-data-broker-future-callback-queue-size}"/>
105 <argument value="CommitFutures"/>
107 <!-- We should use a more specific class -->
108 <bean factory-ref="operDatastore" factory-method="getClass"/>
112 <bean id="commitStatsTracker" class="org.opendaylight.yangtools.util.DurationStatisticsTracker"
113 factory-method="createConcurrent"/>
115 <bean id="clusteredDOMDataBroker" class="org.opendaylight.controller.cluster.databroker.ConcurrentDOMDataBroker"
116 destroy-method="close">
119 <entry key="CONFIGURATION" value-ref="configDatastore"/>
120 <entry key="OPERATIONAL" value-ref="operDatastore"/>
123 <argument ref="listenableFutureExecutor"/>
124 <argument ref="commitStatsTracker"/>
127 <service ref="clusteredDOMDataBroker" interface="org.opendaylight.mdsal.dom.api.DOMDataBroker"
130 <!-- JMX beans for the data broker -->
132 <bean id="commitStatsMXBean" class="org.opendaylight.controller.cluster.datastore.jmx.mbeans.CommitStatsMXBeanImpl"
133 init-method="register" destroy-method="unregister">
134 <argument ref="commitStatsTracker"/>
135 <argument value="DOMDataBroker"/>
138 <bean id="threadStatsMXBean" class="org.opendaylight.controller.md.sal.common.util.jmx.ThreadExecutorStatsMXBeanImpl"
139 factory-method="create" destroy-method="unregister">
140 <argument ref="listenableFutureExecutor"/>
141 <argument value="CommitFutureExecutorStats"/>
142 <argument value="DOMDataBroker"/>
145 <!-- CDS shard manager -->
146 <bean id="cdsNodeManager" class="org.opendaylight.controller.cluster.sharding.DistributedShardedDOMDataTree"
148 <argument ref="actorSystemProvider"/>
149 <argument ref="operDatastore"/>
150 <argument ref="configDatastore"/>
153 <service ref="cdsNodeManager" odl:type="default">
155 <value>org.opendaylight.mdsal.dom.api.DOMDataTreeShardingService</value>
156 <value>org.opendaylight.mdsal.dom.api.DOMDataTreeService</value>
157 <value>org.opendaylight.controller.cluster.sharding.DistributedShardFactory</value>