Object/Class

akka.cluster.sharding

ShardRegion

Related Docs: class ShardRegion | package sharding

Permalink

object ShardRegion

Source
ShardRegion.scala
See also

ClusterSharding extension

Linear Supertypes
Content Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ShardRegion
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. final case class CurrentRegions(regions: Set[Address]) extends Product with Serializable

    Permalink

    Reply to GetCurrentRegions

    Reply to GetCurrentRegions

    Annotations
    @SerialVersionUID()
  2. type EntityId = String

    Permalink

    Marker type of entity identifier (String).

  3. type ExtractEntityId = PartialFunction[Msg, (EntityId, Msg)]

    Permalink

    Interface of the partial function used by the ShardRegion to extract the entity id and the message to send to the entity from an incoming message.

    Interface of the partial function used by the ShardRegion to extract the entity id and the message to send to the entity from an incoming message. The implementation is application specific. If the partial function does not match the message will be unhandled, i.e. posted as Unhandled messages on the event stream. Note that the extracted message does not have to be the same as the incoming message to support wrapping in message envelope that is unwrapped before sending to the entity actor.

  4. type ExtractShardId = (Msg) ⇒ ShardId

    Permalink

    Interface of the function used by the ShardRegion to extract the shard id from an incoming message.

    Interface of the function used by the ShardRegion to extract the shard id from an incoming message. Only messages that passed the ExtractEntityId will be used as input to this function.

  5. abstract class HashCodeMessageExtractor extends MessageExtractor

    Permalink

    Convenience implementation of ShardRegion.MessageExtractor that construct shardId based on the hashCode of the entityId.

    Convenience implementation of ShardRegion.MessageExtractor that construct shardId based on the hashCode of the entityId. The number of unique shards is limited by the given maxNumberOfShards.

  6. trait MessageExtractor extends AnyRef

    Permalink

    Java API: Interface of functions to extract entity id, shard id, and the message to send to the entity from an incoming message.

  7. type Msg = Any

    Permalink

    Marker type of application messages (Any).

  8. final case class Passivate(stopMessage: Any) extends ShardRegionCommand with Product with Serializable

    Permalink

    If the state of the entities are persistent you may stop entities that are not used to reduce memory consumption.

    If the state of the entities are persistent you may stop entities that are not used to reduce memory consumption. This is done by the application specific implementation of the entity actors for example by defining receive timeout (context.setReceiveTimeout). If a message is already enqueued to the entity when it stops itself the enqueued message in the mailbox will be dropped. To support graceful passivation without loosing such messages the entity actor can send this Passivate message to its parent ShardRegion. The specified wrapped stopMessage will be sent back to the entity, which is then supposed to stop itself. Incoming messages will be buffered by the ShardRegion between reception of Passivate and termination of the entity. Such buffered messages are thereafter delivered to a new incarnation of the entity.

    akka.actor.PoisonPill is a perfectly fine stopMessage.

    Annotations
    @SerialVersionUID()
  9. type ShardId = String

    Permalink

    Marker type of shard identifier (String).

  10. final case class ShardInitialized(shardId: ShardId) extends Product with Serializable

    Permalink

    We must be sure that a shard is initialized before to start send messages to it.

    We must be sure that a shard is initialized before to start send messages to it. Shard could be terminated during initialization.

  11. sealed trait ShardRegionCommand extends AnyRef

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object GetCurrentRegions extends ShardRegionCommand with Product with Serializable

    Permalink
    Annotations
    @SerialVersionUID()
  5. object GracefulShutdown extends ShardRegionCommand with Product with Serializable

    Permalink
    Annotations
    @SerialVersionUID()
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def getCurrentRegionsInstance: GetCurrentRegions.type

    Permalink
  13. def gracefulShutdownInstance: GracefulShutdown.type

    Permalink

    Java API: Send this message to the ShardRegion actor to handoff all shards that are hosted by the ShardRegion and then the ShardRegion actor will be stopped.

    Java API: Send this message to the ShardRegion actor to handoff all shards that are hosted by the ShardRegion and then the ShardRegion actor will be stopped. You can watch it to know when it is completed.

  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped