Class NoActiveEntities$
java.lang.Object
org.apache.pekko.cluster.sharding.internal.NoActiveEntities$
INTERNAL API
Disabled ActiveEntities (for no window in composite passivation strategies).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NoActiveEntities$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.pekko.cluster.sharding.internal.ActiveEntitiesapply(ClusterShardingSettings.PassivationStrategy strategy, boolean idleEnabled, scala.Function0<Clock> clock) booleanCheck whether the entity id is currently tracked as active.voidAn entity instance should be removed from active tracking.scala.collection.immutable.Seq<String>removeIdle(scala.concurrent.duration.FiniteDuration timeout) Remove entity instances that have not been active for the given timeout.<any>select()Select the entity that would be passivated by the replacement policy, when active capacity has been reached.intsize()The current number of active entities being tracked.scala.collection.immutable.Seq<String>An entity instance has been touched.scala.collection.immutable.Seq<String>updateLimit(int newLimit) The per-shard active entity limit has been updated, which can trigger passivation.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
NoActiveEntities$
public NoActiveEntities$()
-
-
Method Details
-
size
public int size()The current number of active entities being tracked.- Returns:
- size of active entities
-
isActive
Check whether the entity id is currently tracked as active.- Parameters:
id- the entity id to check- Returns:
- whether the entity is active
-
updateLimit
The per-shard active entity limit has been updated, which can trigger passivation.- Parameters:
newLimit- the new per-shard active entity limit- Returns:
- entities to passivate in the associated shard
-
update
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
-
select
public <any> select()Select the entity that would be passivated by the replacement policy, when active capacity has been reached.- Returns:
- entity that would be passivated
-
remove
An entity instance should be removed from active tracking.- Parameters:
id- entity id for the removed entity instance
-
removeIdle
public scala.collection.immutable.Seq<String> removeIdle(scala.concurrent.duration.FiniteDuration timeout) Remove entity instances that have not been active for the given timeout.- Parameters:
timeout- the idle timeout for entities- Returns:
- entities to passivate, if deemed inactive
-
apply
public static org.apache.pekko.cluster.sharding.internal.ActiveEntities apply(ClusterShardingSettings.PassivationStrategy strategy, boolean idleEnabled, scala.Function0<Clock> clock)
-