I'm trying to instantiate a ClusterSingletonManager using AkkaGuiceSupport
and I'm having a real hard time figuring out the syntax. Without dependency
injection it should look like this.
ClusterSingletonManagerSettings settings =
ClusterSingletonManagerSettings.create(system);
ActorRef master =
system.actorOf(ClusterSingletonManager.props(Props.create(Master.class),
PoisonPill.getInstance(), settings), "master");
using dependency injection I have the following in a module which does not
work. Also note that I'm unsure how to get a valid instance of the
ActorSystem "system"
public class Module extends AbstractModule implements AkkaGuiceSupport {
@Override
protected void configure() {
ClusterSingletonManagerSettings settings =
ClusterSingletonManagerSettings.create(system);
Props clusterProps =
ClusterSingletonManager.props(Props.create(Master.class),
PoisonPill.getInstance(), settings);
bindActor(ClusterSingletonManager.class, "master",
clusterProps);
}
}
How can I get ClusterSingletonManager using a module? Can someone please
give a working example ?
Thanks
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.