--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+ xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.2.0">
+
+ <cm:property-placeholder persistent-id="org.opendaylight.controller.cluster.datastore.broker" update-strategy="none">
+ <cm:default-properties>
+ <cm:property name="max-data-broker-future-callback-queue-size" value="1000"/>
+ <cm:property name="max-data-broker-future-callback-pool-size" value="20"/>
+ </cm:default-properties>
+ </cm:property-placeholder>
+
+ <odl:static-reference id="schemaService" interface="org.opendaylight.mdsal.dom.api.DOMSchemaService" />
+
+ <reference id="classLoadingStrategy" interface="org.opendaylight.mdsal.binding.generator.api.ClassLoadingStrategy" />
+
+ <!-- ActorSystemProvider -->
+
+ <bean id="bundleClassLoader" class="org.opendaylight.controller.cluster.akka.osgi.impl.BundleClassLoaderFactory"
+ factory-method="createClassLoader">
+ <argument ref="blueprintBundleContext" />
+ </bean>
+
+ <bean id="actorSystemProps" class="org.opendaylight.controller.cluster.akka.osgi.impl.QuarantinedMonitorActorPropsFactory"
+ factory-method="createProps">
+ <argument ref="blueprintBundleContext" />
+ </bean>
+
+ <bean id="akkaReader" class="org.opendaylight.controller.cluster.common.actor.FileAkkaConfigurationReader"/>
+ <bean id="akkaConfig" class="org.opendaylight.controller.cluster.akka.impl.AkkaConfigFactory"
+ factory-method="createAkkaConfig">
+ <argument ref="akkaReader" />
+ </bean>
+
+ <bean id="actorSystemProvider" class="org.opendaylight.controller.cluster.akka.impl.ActorSystemProviderImpl"
+ destroy-method="close">
+ <argument ref="bundleClassLoader" />
+ <argument ref="actorSystemProps"/>
+ <argument ref="akkaConfig"/>
+ </bean>
+
+ <service ref="actorSystemProvider" interface="org.opendaylight.controller.cluster.ActorSystemProvider"/>
+
+ <!-- Datastore properties -->
+ <cm:cm-properties id="datastoreProps" persistent-id="org.opendaylight.controller.cluster.datastore"/>
+
+ <!-- Distributed Config Datastore -->
+ <bean id="datastoreSnapshotRestore" class="org.opendaylight.controller.cluster.datastore.DatastoreSnapshotRestore"
+ factory-method="instance">
+ <argument value="./clustered-datastore-restore"/>
+ </bean>
+
+ <bean id="introspectorFactory" class="org.opendaylight.controller.cluster.datastore.DatastoreContextIntrospectorFactory">
+ <argument ref="schemaService"/>
+ <argument ref="classLoadingStrategy"/>
+ </bean>
+
+ <bean id="introspectorConfig" factory-ref="introspectorFactory" factory-method="newInstance">
+ <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="CONFIGURATION"/>
+ </bean>
+
+ <bean id="updaterConfig" class="org.opendaylight.controller.cluster.datastore.DatastoreContextPropertiesUpdater">
+ <cm:managed-properties persistent-id="org.opendaylight.controller.cluster.datastore" update-strategy="component-managed" update-method="update"/>
+ <argument ref="introspectorConfig"/>
+ <argument ref="datastoreProps"/>
+ </bean>
+
+ <bean id="configDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
+ factory-method="createInstance" destroy-method="close">
+ <argument ref="schemaService"/>
+ <argument>
+ <bean factory-ref="introspectorConfig" factory-method="getContext" />
+ </argument>
+ <argument ref="datastoreSnapshotRestore"/>
+ <argument ref="actorSystemProvider"/>
+ <argument ref="introspectorConfig"/>
+ <argument ref="updaterConfig"/>
+ </bean>
+
+ <service ref="configDatastore" odl:type="distributed-config">
+ <interfaces>
+ <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
+ </interfaces>
+ </service>
+
+ <!-- Distributed Operational Datastore -->
+ <bean id="fileModuleShardConfigProvider" class="org.opendaylight.controller.cluster.datastore.config.FileModuleShardConfigProvider">
+ <argument value="./configuration/initial/module-shards.conf"/>
+ <argument value="./configuration/initial/modules.conf"/>
+ </bean>
+
+ <bean id="configurationImpl" class="org.opendaylight.controller.cluster.datastore.config.ConfigurationImpl">
+ <argument ref="fileModuleShardConfigProvider"/>
+ </bean>
+
+ <bean id="introspectorOper" factory-ref="introspectorFactory" factory-method="newInstance">
+ <argument type="org.opendaylight.mdsal.common.api.LogicalDatastoreType" value="OPERATIONAL"/>
+ </bean>
+
+ <bean id="updaterOper" class="org.opendaylight.controller.cluster.datastore.DatastoreContextPropertiesUpdater">
+ <cm:managed-properties persistent-id="org.opendaylight.controller.cluster.datastore" update-strategy="component-managed" update-method="update"/>
+ <argument ref="introspectorOper"/>
+ <argument ref="datastoreProps"/>
+ </bean>
+
+ <bean id="operDatastore" class="org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory"
+ factory-method="createInstance" destroy-method="close">
+ <argument ref="schemaService"/>
+ <argument>
+ <bean factory-ref="introspectorOper" factory-method="getContext" />
+ </argument>
+ <argument ref="datastoreSnapshotRestore"/>
+ <argument ref="actorSystemProvider"/>
+ <argument ref="introspectorOper"/>
+ <argument ref="updaterOper"/>
+ <argument ref="configurationImpl" />
+ </bean>
+
+ <service ref="operDatastore" odl:type="distributed-operational">
+ <interfaces>
+ <value>org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface</value>
+ </interfaces>
+ </service>
+
+ <!-- Concurrent DOMDataBroker -->
+
+ <bean id="listenableFutureExecutor" class="org.opendaylight.yangtools.util.concurrent.SpecialExecutors"
+ factory-method="newBlockingBoundedCachedThreadPool">
+ <argument value="${max-data-broker-future-callback-pool-size}"/>
+ <argument value="${max-data-broker-future-callback-queue-size}"/>
+ <argument value="CommitFutures"/>
+ <argument>
+ <!-- We should use a more specific class -->
+ <bean factory-ref="operDatastore" factory-method="getClass"/>
+ </argument>
+ </bean>
+
+ <bean id="commitStatsTracker" class="org.opendaylight.yangtools.util.DurationStatisticsTracker"
+ factory-method="createConcurrent"/>
+
+ <bean id="clusteredDOMDataBroker" class="org.opendaylight.controller.cluster.databroker.ConcurrentDOMDataBroker"
+ destroy-method="close">
+ <argument>
+ <map>
+ <entry key="CONFIGURATION" value-ref="configDatastore"/>
+ <entry key="OPERATIONAL" value-ref="operDatastore"/>
+ </map>
+ </argument>
+ <argument ref="listenableFutureExecutor"/>
+ <argument ref="commitStatsTracker"/>
+ </bean>
+
+ <service ref="clusteredDOMDataBroker" interface="org.opendaylight.mdsal.dom.api.DOMDataBroker"
+ odl:type="default"/>
+
+ <bean id="legacyDOMDataBroker" class="org.opendaylight.controller.sal.core.compat.LegacyDOMDataBrokerAdapter">
+ <argument ref="clusteredDOMDataBroker"/>
+ </bean>
+
+ <service ref="legacyDOMDataBroker" interface="org.opendaylight.controller.md.sal.dom.api.DOMDataBroker"
+ odl:type="default"/>
+
+ <!-- JMX beans for the data broker -->
+
+ <bean id="commitStatsMXBean" class="org.opendaylight.controller.md.sal.dom.broker.impl.jmx.CommitStatsMXBeanImpl"
+ init-method="register" destroy-method="unregister">
+ <argument ref="commitStatsTracker"/>
+ <argument value="DOMDataBroker"/>
+ </bean>
+
+ <bean id="threadStatsMXBean" class="org.opendaylight.controller.md.sal.common.util.jmx.ThreadExecutorStatsMXBeanImpl"
+ factory-method="create" destroy-method="unregister">
+ <argument ref="listenableFutureExecutor"/>
+ <argument value="CommitFutureExecutorStats"/>
+ <argument value="DOMDataBroker"/>
+ </bean>
+
+ <!-- Distributed EntityOwnershipService -->
+ <cm:cm-properties id="strategiesProps" persistent-id="org.opendaylight.controller.cluster.entity.owner.selection.strategies" />
+
+ <bean id="selectionStrategyConfig" class="org.opendaylight.controller.cluster.datastore.entityownership.selectionstrategy.EntityOwnerSelectionStrategyConfigReader"
+ factory-method="loadStrategyWithConfig">
+ <argument ref="strategiesProps"/>
+ </bean>
+
+ <bean id="distributedEntityOwnershipService" class="org.opendaylight.controller.cluster.datastore.entityownership.DistributedEntityOwnershipService"
+ factory-method="start" destroy-method="close">
+ <argument>
+ <bean factory-ref="operDatastore" factory-method="getActorContext"/>
+ </argument>
+ <argument ref="selectionStrategyConfig"/>
+ </bean>
+
+ <service ref="distributedEntityOwnershipService" interface="org.opendaylight.mdsal.eos.dom.api.DOMEntityOwnershipService"
+ odl:type="default"/>
+
+ <!-- CDS shard manager -->
+ <bean id="cdsNodeManager" class="org.opendaylight.controller.cluster.sharding.DistributedShardedDOMDataTree"
+ init-method="init">
+ <argument ref="actorSystemProvider"/>
+ <argument ref="operDatastore"/>
+ <argument ref="configDatastore"/>
+ </bean>
+
+ <service ref="cdsNodeManager" odl:type="default">
+ <interfaces>
+ <value>org.opendaylight.mdsal.dom.api.DOMDataTreeShardingService</value>
+ <value>org.opendaylight.mdsal.dom.api.DOMDataTreeService</value>
+ <value>org.opendaylight.controller.cluster.sharding.DistributedShardFactory</value>
+ </interfaces>
+ </service>
+
+</blueprint>