X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FActorSystemFactory.java;h=15c0548761ecd96afee865025fc573d5a2d38c6e;hb=f4b583dd481d8db60c894690a6c9189922f360a9;hp=c562e6f50f173f27b943ab358c7828c039eecaf1;hpb=d6d463bdd587ae6eb8884c914787af061c6f2973;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ActorSystemFactory.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ActorSystemFactory.java index c562e6f50f..15c0548761 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ActorSystemFactory.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ActorSystemFactory.java @@ -9,12 +9,23 @@ package org.opendaylight.controller.cluster.datastore; import akka.actor.ActorSystem; +import akka.actor.Props; +import com.google.common.base.Function; import com.typesafe.config.ConfigFactory; +import javax.annotation.Nullable; + public class ActorSystemFactory { - private static final ActorSystem actorSystem = - ActorSystem.create("opendaylight-cluster", ConfigFactory - .load().getConfig("ODLCluster")); + private static final ActorSystem actorSystem = (new Function(){ + + @Nullable @Override public ActorSystem apply(@Nullable Void aVoid) { + ActorSystem system = + ActorSystem.create("opendaylight-cluster-data", ConfigFactory + .load().getConfig("odl-cluster-data")); + system.actorOf(Props.create(TerminationMonitor.class), "termination-monitor"); + return system; + } + }).apply(null); public static final ActorSystem getInstance(){ return actorSystem;