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<Void, ActorSystem>(){
+
+ @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;