Simplify signature of ClusterSharding.spawn, #25480

This commit is contained in:
Patrik Nordwall 2018-08-28 11:41:34 +02:00
parent 2a5f254f16
commit 0804daf1a5
16 changed files with 465 additions and 298 deletions

View file

@ -539,6 +539,10 @@ class ClusterSharding(system: ExtendedActorSystem) extends Extension {
}
}
/**
* The default is currently [[akka.cluster.sharding.ShardCoordinator.LeastShardAllocationStrategy]] with the
* given `settings`. This could be changed in the future.
*/
def defaultShardAllocationStrategy(settings: ClusterShardingSettings): ShardAllocationStrategy = {
val threshold = settings.tuningParameters.leastShardAllocationRebalanceThreshold
val maxSimultaneousRebalance = settings.tuningParameters.leastShardAllocationMaxSimultaneousRebalance