Class/Object

akka.cluster.sharding

ClusterSharding

Related Docs: object ClusterSharding | package sharding

Permalink

class ClusterSharding extends Extension

Source
ClusterSharding.scala
See also

ClusterSharding companion object

Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ClusterSharding
  2. Extension
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ClusterSharding(system: ExtendedActorSystem)

    Permalink

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from ClusterSharding to any2stringadd[ClusterSharding] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (ClusterSharding, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from ClusterSharding to ArrowAssoc[ClusterSharding] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  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. def ensuring(cond: (ClusterSharding) ⇒ Boolean, msg: ⇒ Any): ClusterSharding

    Permalink
    Implicit information
    This member is added by an implicit conversion from ClusterSharding to Ensuring[ClusterSharding] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (ClusterSharding) ⇒ Boolean): ClusterSharding

    Permalink
    Implicit information
    This member is added by an implicit conversion from ClusterSharding to Ensuring[ClusterSharding] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ Any): ClusterSharding

    Permalink
    Implicit information
    This member is added by an implicit conversion from ClusterSharding to Ensuring[ClusterSharding] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): ClusterSharding

    Permalink
    Implicit information
    This member is added by an implicit conversion from ClusterSharding to Ensuring[ClusterSharding] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from ClusterSharding to StringFormat[ClusterSharding] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def getShardTypeNames: Set[String]

    Permalink

    Java API: get all currently defined sharding type names.

  18. def hashCode(): Int

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  23. def shardRegion(typeName: String): ActorRef

    Permalink

    Retrieve the actor reference of the ShardRegion actor responsible for the named entity type.

    Retrieve the actor reference of the ShardRegion actor responsible for the named entity type. The entity type must be registered with the #start or #startProxy method before it can be used here. Messages to the entity is always sent via the ShardRegion.

  24. def shardRegionProxy(typeName: String, dataCenter: DataCenter): ActorRef

    Permalink

    Retrieve the actor reference of the ShardRegion actor that will act as a proxy to the named entity type running in another data center.

    Retrieve the actor reference of the ShardRegion actor that will act as a proxy to the named entity type running in another data center. A proxy within the same data center can be accessed with #shardRegion instead of this method. The entity type must be registered with the #startProxy method before it can be used here. Messages to the entity is always sent via the ShardRegion.

  25. def shardTypeNames: Set[String]

    Permalink

    Scala API: get all currently defined sharding type names.

  26. def start(typeName: String, entityProps: Props, settings: ClusterShardingSettings, messageExtractor: MessageExtractor): ActorRef

    Permalink

    Java/Scala API: Register a named entity type by defining the akka.actor.Props of the entity actor and functions to extract entity and shard identifier from messages.

    Java/Scala API: Register a named entity type by defining the akka.actor.Props of the entity actor and functions to extract entity and shard identifier from messages. The ShardRegion actor for this type can later be retrieved with the #shardRegion method.

    The default shard allocation strategy ShardCoordinator.LeastShardAllocationStrategy is used. akka.actor.PoisonPill is used as handOffStopMessage.

    Some settings can be configured as described in the akka.cluster.sharding section of the reference.conf.

    typeName

    the name of the entity type

    entityProps

    the Props of the entity actors that will be created by the ShardRegion

    settings

    configuration settings, see ClusterShardingSettings

    messageExtractor

    functions to extract the entity id, shard id, and the message to send to the entity from the incoming message

    returns

    the actor ref of the ShardRegion that is to be responsible for the shard

  27. def start(typeName: String, entityProps: Props, settings: ClusterShardingSettings, messageExtractor: MessageExtractor, allocationStrategy: ShardAllocationStrategy, handOffStopMessage: Any): ActorRef

    Permalink

    Java/Scala API: Register a named entity type by defining the akka.actor.Props of the entity actor and functions to extract entity and shard identifier from messages.

    Java/Scala API: Register a named entity type by defining the akka.actor.Props of the entity actor and functions to extract entity and shard identifier from messages. The ShardRegion actor for this type can later be retrieved with the #shardRegion method.

    Some settings can be configured as described in the akka.cluster.sharding section of the reference.conf.

    typeName

    the name of the entity type

    entityProps

    the Props of the entity actors that will be created by the ShardRegion

    settings

    configuration settings, see ClusterShardingSettings

    messageExtractor

    functions to extract the entity id, shard id, and the message to send to the entity from the incoming message, see ShardRegion.MessageExtractor

    allocationStrategy

    possibility to use a custom shard allocation and rebalancing logic

    handOffStopMessage

    the message that will be sent to entities when they are to be stopped for a rebalance or graceful shutdown of a ShardRegion, e.g. PoisonPill.

    returns

    the actor ref of the ShardRegion that is to be responsible for the shard

  28. def start(typeName: String, entityProps: Props, settings: ClusterShardingSettings, extractEntityId: ExtractEntityId, extractShardId: ExtractShardId): ActorRef

    Permalink

    Register a named entity type by defining the akka.actor.Props of the entity actor and functions to extract entity and shard identifier from messages.

    Register a named entity type by defining the akka.actor.Props of the entity actor and functions to extract entity and shard identifier from messages. The ShardRegion actor for this type can later be retrieved with the shardRegion method.

    The default shard allocation strategy ShardCoordinator.LeastShardAllocationStrategy is used. akka.actor.PoisonPill is used as handOffStopMessage.

    Some settings can be configured as described in the akka.cluster.sharding section of the reference.conf.

    typeName

    the name of the entity type

    entityProps

    the Props of the entity actors that will be created by the ShardRegion

    settings

    configuration settings, see ClusterShardingSettings

    extractEntityId

    partial function to extract the entity id and the message to send to the entity from the incoming message, if the partial function does not match the message will be unhandled, i.e. posted as Unhandled messages on the event stream

    extractShardId

    function to determine the shard id for an incoming message, only messages that passed the extractEntityId will be used

    returns

    the actor ref of the ShardRegion that is to be responsible for the shard

  29. def start(typeName: String, entityProps: Props, settings: ClusterShardingSettings, extractEntityId: ExtractEntityId, extractShardId: ExtractShardId, allocationStrategy: ShardAllocationStrategy, handOffStopMessage: Any): ActorRef

    Permalink

    Scala API: Register a named entity type by defining the akka.actor.Props of the entity actor and functions to extract entity and shard identifier from messages.

    Scala API: Register a named entity type by defining the akka.actor.Props of the entity actor and functions to extract entity and shard identifier from messages. The ShardRegion actor for this type can later be retrieved with the shardRegion method.

    Some settings can be configured as described in the akka.cluster.sharding section of the reference.conf.

    typeName

    the name of the entity type

    entityProps

    the Props of the entity actors that will be created by the ShardRegion

    settings

    configuration settings, see ClusterShardingSettings

    extractEntityId

    partial function to extract the entity id and the message to send to the entity from the incoming message, if the partial function does not match the message will be unhandled, i.e. posted as Unhandled messages on the event stream

    extractShardId

    function to determine the shard id for an incoming message, only messages that passed the extractEntityId will be used

    allocationStrategy

    possibility to use a custom shard allocation and rebalancing logic

    handOffStopMessage

    the message that will be sent to entities when they are to be stopped for a rebalance or graceful shutdown of a ShardRegion, e.g. PoisonPill.

    returns

    the actor ref of the ShardRegion that is to be responsible for the shard

  30. def startProxy(typeName: String, role: Optional[String], dataCenter: Optional[String], messageExtractor: MessageExtractor): ActorRef

    Permalink

    Java/Scala API: Register a named entity type ShardRegion on this node that will run in proxy only mode, i.e.

    Java/Scala API: Register a named entity type ShardRegion on this node that will run in proxy only mode, i.e. it will delegate messages to other ShardRegion actors on other nodes, but not host any entity actors itself. The ShardRegion actor for this type can later be retrieved with the #shardRegion method.

    Some settings can be configured as described in the akka.cluster.sharding section of the reference.conf.

    typeName

    the name of the entity type

    role

    specifies that this entity type is located on cluster nodes with a specific role. If the role is not specified all nodes in the cluster are used.

    dataCenter

    The data center of the cluster nodes where the cluster sharding is running. If None then the same data center as current node.

    messageExtractor

    functions to extract the entity id, shard id, and the message to send to the entity from the incoming message

    returns

    the actor ref of the ShardRegion that is to be responsible for the shard

  31. def startProxy(typeName: String, role: Optional[String], messageExtractor: MessageExtractor): ActorRef

    Permalink

    Java/Scala API: Register a named entity type ShardRegion on this node that will run in proxy only mode, i.e.

    Java/Scala API: Register a named entity type ShardRegion on this node that will run in proxy only mode, i.e. it will delegate messages to other ShardRegion actors on other nodes, but not host any entity actors itself. The ShardRegion actor for this type can later be retrieved with the #shardRegion method.

    Some settings can be configured as described in the akka.cluster.sharding section of the reference.conf.

    typeName

    the name of the entity type

    role

    specifies that this entity type is located on cluster nodes with a specific role. If the role is not specified all nodes in the cluster are used.

    messageExtractor

    functions to extract the entity id, shard id, and the message to send to the entity from the incoming message

    returns

    the actor ref of the ShardRegion that is to be responsible for the shard

  32. def startProxy(typeName: String, role: Option[String], dataCenter: Option[DataCenter], extractEntityId: ExtractEntityId, extractShardId: ExtractShardId): ActorRef

    Permalink

    Scala API: Register a named entity type ShardRegion on this node that will run in proxy only mode, i.e.

    Scala API: Register a named entity type ShardRegion on this node that will run in proxy only mode, i.e. it will delegate messages to other ShardRegion actors on other nodes, but not host any entity actors itself. The ShardRegion actor for this type can later be retrieved with the #shardRegion method.

    Some settings can be configured as described in the akka.cluster.sharding section of the reference.conf.

    typeName

    the name of the entity type

    role

    specifies that this entity type is located on cluster nodes with a specific role. If the role is not specified all nodes in the cluster are used.

    dataCenter

    The data center of the cluster nodes where the cluster sharding is running. If None then the same data center as current node.

    extractEntityId

    partial function to extract the entity id and the message to send to the entity from the incoming message, if the partial function does not match the message will be unhandled, i.e. posted as Unhandled messages on the event stream

    extractShardId

    function to determine the shard id for an incoming message, only messages that passed the extractEntityId will be used

    returns

    the actor ref of the ShardRegion that is to be responsible for the shard

  33. def startProxy(typeName: String, role: Option[String], extractEntityId: ExtractEntityId, extractShardId: ExtractShardId): ActorRef

    Permalink

    Scala API: Register a named entity type ShardRegion on this node that will run in proxy only mode, i.e.

    Scala API: Register a named entity type ShardRegion on this node that will run in proxy only mode, i.e. it will delegate messages to other ShardRegion actors on other nodes, but not host any entity actors itself. The ShardRegion actor for this type can later be retrieved with the #shardRegion method.

    Some settings can be configured as described in the akka.cluster.sharding section of the reference.conf.

    typeName

    the name of the entity type

    role

    specifies that this entity type is located on cluster nodes with a specific role. If the role is not specified all nodes in the cluster are used.

    extractEntityId

    partial function to extract the entity id and the message to send to the entity from the incoming message, if the partial function does not match the message will be unhandled, i.e. posted as Unhandled messages on the event stream

    extractShardId

    function to determine the shard id for an incoming message, only messages that passed the extractEntityId will be used

    returns

    the actor ref of the ShardRegion that is to be responsible for the shard

  34. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. def [B](y: B): (ClusterSharding, B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from ClusterSharding to ArrowAssoc[ClusterSharding] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Extension

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from ClusterSharding to any2stringadd[ClusterSharding]

Inherited by implicit conversion StringFormat from ClusterSharding to StringFormat[ClusterSharding]

Inherited by implicit conversion Ensuring from ClusterSharding to Ensuring[ClusterSharding]

Inherited by implicit conversion ArrowAssoc from ClusterSharding to ArrowAssoc[ClusterSharding]

Ungrouped