Package

akka.typed.cluster

sharding

Permalink

package sharding

Content Hierarchy
Visibility
  1. Public
  2. All

Type Members

  1. final class AdaptedClusterShardingImpl extends ClusterSharding

    Permalink

    INTERNAL API

    INTERNAL API

    Annotations
    @InternalApi()
  2. sealed trait ClusterSharding extends Extension

    Permalink
    Annotations
    @DoNotInherit()
  3. final class ClusterShardingSettings extends NoSerializationVerificationNeeded

    Permalink

  4. trait EntityRef[A] extends AnyRef

    Permalink

    A reference to an sharded Entity, which allows ActorRef-like usage.

    A reference to an sharded Entity, which allows ActorRef-like usage.

    An EntityRef is NOT an ActorRef–by design–in order to be explicit about the fact that the life-cycle of a sharded Entity is very different than a plain Actors. Most notably, this is shown by features of Entities such as re-balancing (an active Entity to a different node) or passivation. Both of which are aimed to be completely transparent to users of such Entity. In other words, if this were to be a plain ActorRef, it would be possible to apply DeathWatch to it, which in turn would then trigger when the sharded Actor stopped, breaking the illusion that Entity refs are "always there". Please note that while not encouraged, it is possible to expose an Actor's self ActorRef and watch it in case such notification is desired.

  5. abstract class EntityTypeKey[T] extends AnyRef

    Permalink

    The key of an entity type, the name must be unique.

  6. final class HashCodeMessageExtractor[A] extends ShardingMessageExtractor[ShardingEnvelope[A], A]

    Permalink

    Java API:

    Java API:

    Default message extractor type, using envelopes to identify what entity a message is for and the hashcode of the entityId to decide which shard an entity belongs to.

    This is recommended since it does not force details about sharding into the entity protocol

    A

    The type of message accepted by the entity actor

  7. abstract class HashCodeNoEnvelopeMessageExtractor[A] extends ShardingMessageExtractor[A, A]

    Permalink

    Java API:

    Java API:

    Default message extractor type, using a property of the message to identify what entity a message is for and the hashcode of the entityId to decide which shard an entity belongs to.

    This is recommended since it does not force details about sharding into the entity protocol

    A

    The type of message accepted by the entity actor

  8. final case class ShardingEnvelope[A](entityId: String, message: A) extends Product with Serializable

    Permalink

    Default envelope type that may be used with Cluster Sharding.

    Default envelope type that may be used with Cluster Sharding.

    Cluster Sharding provides a default HashCodeMessageExtractor that is able to handle these types of messages, by hashing the entityId into into the shardId. It is not the only, but a convenient way to send envelope-wrapped messages via cluster sharding.

    The alternative way of routing messages through sharding is to not use envelopes, and have the message types themselfs carry identifiers.

  9. trait ShardingMessageExtractor[E, A] extends AnyRef

    Permalink

    Entirely customizable typed message extractor.

    Entirely customizable typed message extractor. Prefer HashCodeMessageExtractor or HashCodeNoEnvelopeMessageExtractor if possible.

    E

    Possibly an Envelope around the messages accepted by the entity actor, is the same as A if there is no envelope.

    A

    The type of message accepted by the entity actor

Value Members

  1. object ClusterSharding extends ExtensionId[ClusterSharding]

    Permalink
  2. object ClusterShardingSettings

    Permalink
  3. object EntityRef

    Permalink
  4. object EntityTypeKey

    Permalink
  5. object ShardingMessageExtractor

    Permalink
  6. object StartEntity

    Permalink

    Allows starting a specific Sharded Entity by its entity identifier

  7. package internal

    Permalink

Ungrouped