X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FDistributedDataStoreFactory.java;h=484a400a5744613c2dbcebe61070d05d3f1cf558;hp=211465a35b7f8e53fee6eaf11ef4d13266a2f557;hb=e332f9d44cad4d8592475ad409ed06595f0bbb15;hpb=0e1824a2f55e35c5b6cfd0407e27dbe1a7c54cf3 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreFactory.java index 211465a35b..484a400a57 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreFactory.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreFactory.java @@ -8,6 +8,7 @@ package org.opendaylight.controller.cluster.datastore; import akka.actor.ActorSystem; +import org.opendaylight.controller.cluster.ActorSystemProvider; import org.opendaylight.controller.cluster.datastore.config.Configuration; import org.opendaylight.controller.cluster.datastore.config.ConfigurationImpl; import org.opendaylight.controller.cluster.datastore.messages.DatastoreSnapshot; @@ -20,11 +21,14 @@ public class DistributedDataStoreFactory { private static final Logger LOG = LoggerFactory.getLogger(DistributedDataStoreFactory.class); public static DistributedDataStore createInstance(SchemaService schemaService, - DatastoreContext datastoreContext, DatastoreSnapshot restoreFromSnapshot, ActorSystem actorSystem, - BundleContext bundleContext) { + DatastoreContext datastoreContext, DatastoreSnapshotRestore datastoreSnapshotRestore, + ActorSystemProvider actorSystemProvider, BundleContext bundleContext) { LOG.info("Create data store instance of type : {}", datastoreContext.getDataStoreName()); + ActorSystem actorSystem = actorSystemProvider.getActorSystem(); + DatastoreSnapshot restoreFromSnapshot = datastoreSnapshotRestore.getAndRemove( + datastoreContext.getDataStoreName()); DatastoreContextIntrospector introspector = new DatastoreContextIntrospector(datastoreContext); DatastoreContextConfigAdminOverlay overlay = new DatastoreContextConfigAdminOverlay( introspector, bundleContext);