!clt #15410 Change path in ClusterSingletonProxy.props

* to avoid giving the name of both singleton manager and singleton instance
This commit is contained in:
Patrik Nordwall 2015-06-04 21:21:37 +02:00
parent bc4d480d7e
commit 23c28af469
17 changed files with 73 additions and 121 deletions

View file

@ -35,16 +35,16 @@ public class StatsSampleOneMasterMain {
//#create-singleton-manager
ClusterSingletonManagerSettings settings = ClusterSingletonManagerSettings.create(system)
.withSingletonName("statsService").withRole("compute");
.withRole("compute");
system.actorOf(ClusterSingletonManager.props(
Props.create(StatsService.class), PoisonPill.getInstance(), settings),
"singleton");
"statsService");
//#create-singleton-manager
//#singleton-proxy
ClusterSingletonProxySettings proxySettings =
ClusterSingletonProxySettings.create(system).withRole("compute");
system.actorOf(ClusterSingletonProxy.props("/user/singleton/statsService",
system.actorOf(ClusterSingletonProxy.props("/user/statsService",
proxySettings), "statsServiceProxy");
//#singleton-proxy
}