Package akka.cluster.sharding.internal
Class NoActiveEntities$
- java.lang.Object
-
- akka.cluster.sharding.internal.NoActiveEntities$
-
public class NoActiveEntities$ extends java.lang.Object
INTERNAL APIDisabled ActiveEntities (for no window in composite passivation strategies).
-
-
Field Summary
Fields Modifier and Type Field Description static NoActiveEntities$
MODULE$
Static reference to the singleton instance of this Scala object.
-
Constructor Summary
Constructors Constructor Description NoActiveEntities$()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static akka.cluster.sharding.internal.ActiveEntities
apply(ClusterShardingSettings.PassivationStrategy strategy, boolean idleEnabled)
boolean
isActive(java.lang.String id)
Check whether the entity id is currently tracked as active.void
remove(java.lang.String id)
An entity instance should be removed from active tracking.scala.collection.immutable.Seq<java.lang.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.int
size()
The current number of active entities being tracked.scala.collection.immutable.Seq<java.lang.String>
update(java.lang.String id)
An entity instance has been touched.scala.collection.immutable.Seq<java.lang.String>
updateLimit(int newLimit)
The per-shard active entity limit has been updated, which can trigger passivation.
-
-
-
Field Detail
-
MODULE$
public static final NoActiveEntities$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
size
public int size()
The current number of active entities being tracked.- Returns:
- size of active entities
-
isActive
public boolean isActive(java.lang.String id)
Check whether the entity id is currently tracked as active.- Parameters:
id
- the entity id to check- Returns:
- whether the entity is active
-
updateLimit
public scala.collection.immutable.Seq<java.lang.String> updateLimit(int newLimit)
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
public scala.collection.immutable.Seq<java.lang.String> update(java.lang.String id)
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
public void remove(java.lang.String id)
An entity instance should be removed from active tracking.- Parameters:
id
- entity id for the removed entity instance
-
removeIdle
public scala.collection.immutable.Seq<java.lang.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 akka.cluster.sharding.internal.ActiveEntities apply(ClusterShardingSettings.PassivationStrategy strategy, boolean idleEnabled)
-
-