Package

com.lightbend.lagom.internal.persistence

cluster

Permalink

package cluster

Visibility
  1. Public
  2. All

Type Members

  1. class ClusterDistribution extends Extension

    Permalink

    Distributes a static list of entities evenly over a cluster, ensuring that they are all continuously active.

    Distributes a static list of entities evenly over a cluster, ensuring that they are all continuously active.

    This uses cluster sharding underneath, using a scheduled tick sent to each entity as a mechanism to ensure they are active.

    Entities are cluster sharding entities, so they can discover their ID by inspecting their name. Additionally, entities should handle the com.lightbend.lagom.internal.persistence.cluster.ClusterDistribution.EnsureActive message, typically they can do nothing in response to it.

  2. case class ClusterDistributionSettings(clusterShardingSettings: ClusterShardingSettings, ensureActiveInterval: FiniteDuration) extends Product with Serializable

    Permalink

    Settings for cluster distribution.

    Settings for cluster distribution.

    clusterShardingSettings

    The cluster sharding settings.

    ensureActiveInterval

    The interval at which entities are ensured to be active.

  3. class ClusterStartupTask extends AnyRef

    Permalink

Value Members

  1. object ClusterDistribution extends ExtensionId[ClusterDistribution] with ExtensionIdProvider

    Permalink
  2. object ClusterDistributionSettings extends Serializable

    Permalink
  3. object ClusterStartupTask

    Permalink

    Performs an idempotent task on one node on cluster startup.

    Performs an idempotent task on one node on cluster startup.

    The task guarantees that when the actor is asked to perform the operation, the operation will only be executed on one node of the cluster at a time, and that when the returned future is redeemed, the task will be performed.

    This will start a cluster singleton which will execute the task. The task may be executed again when a new node becomes the singleton, hence the task must be idempotent.

    If the task fails, it will be re-executed using exponential backoff using the given backoff parameters.

Ungrouped