Class NoActiveEntities$

java.lang.Object
org.apache.pekko.cluster.sharding.internal.NoActiveEntities$

public class NoActiveEntities$ extends Object
INTERNAL API

Disabled ActiveEntities (for no window in composite passivation strategies).

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final NoActiveEntities$
    Static reference to the singleton instance of this Scala object.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.pekko.cluster.sharding.internal.ActiveEntities
    apply(ClusterShardingSettings.PassivationStrategy strategy, boolean idleEnabled, scala.Function0<Clock> clock)
     
    boolean
    Check whether the entity id is currently tracked as active.
    void
    An 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 the entity that would be passivated by the replacement policy, when active capacity has been reached.
    int
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MODULE$

      public static final NoActiveEntities$ 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

      public boolean isActive(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<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<String> update(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(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<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)