import akka.actor.ActorRef;
import akka.actor.ActorSelection;
import akka.actor.ActorSystem;
+import akka.actor.PoisonPill;
import akka.util.Timeout;
+import org.opendaylight.controller.cluster.datastore.Configuration;
import org.opendaylight.controller.cluster.datastore.exceptions.PrimaryNotFoundException;
import org.opendaylight.controller.cluster.datastore.exceptions.TimeoutException;
import org.opendaylight.controller.cluster.datastore.messages.FindPrimary;
import org.opendaylight.controller.cluster.datastore.messages.PrimaryFound;
+import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import scala.concurrent.Await;
private final ActorSystem actorSystem;
private final ActorRef shardManager;
+ private final Configuration configuration;
- public ActorContext(ActorSystem actorSystem, ActorRef shardManager){
+ private SchemaContext schemaContext = null;
+
+ public ActorContext(ActorSystem actorSystem, ActorRef shardManager, Configuration configuration){
this.actorSystem = actorSystem;
this.shardManager = shardManager;
+ this.configuration = configuration;
}
public ActorSystem getActorSystem() {
return executeRemoteOperation(primary, message, duration);
}
+ public void shutdown() {
+ shardManager.tell(PoisonPill.getInstance(), null);
+ actorSystem.shutdown();
+ }
}