Class DisabledEntityPassivationStrategy$
java.lang.Object
org.apache.pekko.cluster.sharding.internal.DisabledEntityPassivationStrategy$
INTERNAL API: No-op passivation strategy for when automatic passivation is disabled.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DisabledEntityPassivationStrategy$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.pekko.cluster.sharding.internal.EntityPassivationStrategyapply(ClusterShardingSettings settings) voidAn entity instance has been terminated and should be removed from active tracking.scala.collection.immutable.Seq<String>entityTouched(String id) An entity instance has been touched.scala.collection.immutable.Seq<String>Called each time thescheduledIntervalhas passed, if defined.scala.collection.immutable.Seq<String>limitUpdated(int newLimit) The per-region active entity limit has been updated, which can trigger passivation.scala.Option<scala.concurrent.duration.FiniteDuration>An optional interval for time-based passivation strategies.scala.collection.immutable.Seq<String>shardsUpdated(int activeShards) Active shards in this region have been updated, which can trigger passivation.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
DisabledEntityPassivationStrategy$
public DisabledEntityPassivationStrategy$()
-
-
Method Details
-
limitUpdated
The per-region active entity limit has been updated, which can trigger passivation.- Parameters:
newLimit- the new per-region active entity limit- Returns:
- entities to passivate in the associated shard
-
shardsUpdated
Active shards in this region have been updated, which can trigger passivation.- Parameters:
activeShards- updated number of active shards- Returns:
- entities to passivate in the associated shard
-
entityTouched
An entity instance has been touched. Recorded before message delivery.- Parameters:
id- entity id for the touched entity instance- Returns:
- entities to passivate, when active capacity has been reached
-
entityTerminated
An entity instance has been terminated and should be removed from active tracking.- Parameters:
id- entity id for the terminated entity instance
-
scheduledInterval
public scala.Option<scala.concurrent.duration.FiniteDuration> scheduledInterval()An optional interval for time-based passivation strategies.- Returns:
- the scheduled interval to call the
intervalPassedmethod
-
intervalPassed
Called each time thescheduledIntervalhas passed, if defined.- Returns:
- entities to passivate, if deemed inactive
-
apply
public static org.apache.pekko.cluster.sharding.internal.EntityPassivationStrategy apply(ClusterShardingSettings settings)
-