Consolidated passivation check on settings used in region and shard (#27738)
This commit is contained in:
parent
a84aa0095c
commit
ef09dca732
5 changed files with 63 additions and 11 deletions
|
|
@ -311,6 +311,11 @@ final class ClusterShardingSettings(
|
|||
private[akka] def shouldHostShard(cluster: Cluster): Boolean =
|
||||
role.forall(cluster.selfMember.roles.contains)
|
||||
|
||||
/** If true, idle entities should be passivated if they have not received any message by this interval, otherwise it is not enabled. */
|
||||
@InternalApi
|
||||
private[akka] val shouldPassivateIdleEntities: Boolean =
|
||||
passivateIdleEntityAfter > Duration.Zero && !rememberEntities
|
||||
|
||||
def withRole(role: String): ClusterShardingSettings = copy(role = ClusterShardingSettings.roleOption(role))
|
||||
|
||||
def withRole(role: Option[String]): ClusterShardingSettings = copy(role = role)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue