!clt #15410 Change path in ClusterSingletonProxy.props
* to avoid giving the name of both singleton manager and singleton instance
This commit is contained in:
parent
bc4d480d7e
commit
23c28af469
17 changed files with 73 additions and 121 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue