Class/Object

akka.cluster.sharding

ShardRegion

Related Docs: object ShardRegion | package sharding

Permalink

class ShardRegion extends Actor with ActorLogging

This actor creates children entity actors on demand for the shards that it is told to be responsible for. It delegates messages targeted to other shards to the responsible ShardRegion actor on other nodes.

Source
ShardRegion.scala
See also

ClusterSharding extension

Linear Supertypes
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ShardRegion
  2. ActorLogging
  3. Actor
  4. AnyRef
  5. 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 ShardRegion(typeName: String, entityProps: Option[Props], settings: ClusterShardingSettings, coordinatorPath: String, extractEntityId: ExtractEntityId, extractShardId: ExtractShardId, handOffStopMessage: Any)

    Permalink

Type Members

  1. type Receive = PartialFunction[Any, Unit]

    Permalink
    Definition Classes
    Actor

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 ShardRegion to any2stringadd[ShardRegion] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (ShardRegion, B)

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

    Permalink
    Definition Classes
    AnyRef → Any
  6. val ageOrdering: Ordering[Member]

    Permalink
  7. def aroundPostRestart(reason: Throwable): Unit

    Permalink

    Can be overridden to intercept calls to postRestart.

    Can be overridden to intercept calls to postRestart. Calls postRestart by default.

    Attributes
    protected[akka]
    Definition Classes
    Actor
  8. def aroundPostStop(): Unit

    Permalink

    Can be overridden to intercept calls to postStop.

    Can be overridden to intercept calls to postStop. Calls postStop by default.

    Attributes
    protected[akka]
    Definition Classes
    Actor
  9. def aroundPreRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink

    Can be overridden to intercept calls to preRestart.

    Can be overridden to intercept calls to preRestart. Calls preRestart by default.

    Attributes
    protected[akka]
    Definition Classes
    Actor
  10. def aroundPreStart(): Unit

    Permalink

    Can be overridden to intercept calls to preStart.

    Can be overridden to intercept calls to preStart. Calls preStart by default.

    Attributes
    protected[akka]
    Definition Classes
    Actor
  11. def aroundReceive(receive: actor.Actor.Receive, msg: Any): Unit

    Permalink

    INTERNAL API.

    INTERNAL API.

    Can be overridden to intercept calls to this actor's current behavior.

    receive

    current behavior.

    msg

    current message.

    Attributes
    protected[akka]
    Definition Classes
    Actor
  12. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  13. def bufferMessage(shardId: ShardId, msg: Any, snd: ActorRef): Unit

    Permalink
  14. def changeMembers(newMembers: SortedSet[Member]): Unit

    Permalink
  15. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. val cluster: Cluster

    Permalink
  17. implicit val context: ActorContext

    Permalink

    Stores the context for this actor, including self, and sender.

    Stores the context for this actor, including self, and sender. It is implicit to support operations such as forward.

    WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!

    akka.actor.ActorContext is the Scala API. getContext returns a akka.actor.UntypedActorContext, which is the Java API of the actor context.

    Definition Classes
    Actor
  18. var coordinator: Option[ActorRef]

    Permalink
  19. def coordinatorSelection: Option[ActorSelection]

    Permalink
  20. def deliverBufferedMessages(shardId: ShardId, receiver: ActorRef): Unit

    Permalink
  21. def deliverMessage(msg: Any, snd: ActorRef): Unit

    Permalink
  22. def ensuring(cond: (ShardRegion) ⇒ Boolean, msg: ⇒ Any): ShardRegion

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  31. def getShard(id: ShardId): Option[ActorRef]

    Permalink
  32. var gracefulShutdownInProgress: Boolean

    Permalink
  33. var handingOff: Set[ActorRef]

    Permalink
  34. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  35. def initializeShard(id: ShardId, shard: ActorRef): Unit

    Permalink
  36. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  37. def log: LoggingAdapter

    Permalink
    Definition Classes
    ActorLogging
  38. var loggedFullBufferWarning: Boolean

    Permalink
  39. def matchingRole(member: Member): Boolean

    Permalink
  40. var membersByAge: SortedSet[Member]

    Permalink
  41. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  44. def postRestart(reason: Throwable): Unit

    Permalink

    User overridable callback: By default it calls preStart().

    User overridable callback: By default it calls preStart().

    reason

    the Throwable that caused the restart to happen Is called right AFTER restart on the newly created Actor to allow reinitialization after an Actor crash.

    Definition Classes
    Actor
    Annotations
    @throws( classOf[Exception] )
  45. def postStop(): Unit

    Permalink

    User overridable callback.

    User overridable callback.

    Is called asynchronously after 'actor.stop()' is invoked. Empty default implementation.

    Definition Classes
    ShardRegionActor
  46. def preRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink

    User overridable callback: By default it disposes of all children and then calls postStop().

    User overridable callback: By default it disposes of all children and then calls postStop().

    reason

    the Throwable that caused the restart to happen

    message

    optionally the current message the actor processed when failing, if applicable Is called on a crashed Actor right BEFORE it is restarted to allow clean up of resources before Actor is terminated.

    Definition Classes
    Actor
    Annotations
    @throws( classOf[Exception] )
  47. def preStart(): Unit

    Permalink

    User overridable callback.

    User overridable callback.

    Is called when an Actor is started. Actors are automatically started asynchronously when created. Empty default implementation.

    Definition Classes
    ShardRegionActor
  48. def receive: PartialFunction[Any, Unit]

    Permalink

    This defines the initial actor behavior, it must return a partial function with the actor logic.

    This defines the initial actor behavior, it must return a partial function with the actor logic.

    Definition Classes
    ShardRegionActor
  49. def receiveClusterEvent(evt: ClusterDomainEvent): Unit

    Permalink
  50. def receiveClusterState(state: CurrentClusterState): Unit

    Permalink
  51. def receiveCommand(cmd: ShardRegionCommand): Unit

    Permalink
  52. def receiveCoordinatorMessage(msg: CoordinatorMessage): Unit

    Permalink
  53. def receiveTerminated(ref: ActorRef): Unit

    Permalink
  54. var regionByShard: Map[ShardId, ActorRef]

    Permalink
  55. var regions: Map[ActorRef, Set[ShardId]]

    Permalink
  56. def register(): Unit

    Permalink
  57. def registrationMessage: Any

    Permalink
  58. def requestShardBufferHomes(): Unit

    Permalink
  59. var retryCount: Int

    Permalink
  60. val retryTask: Cancellable

    Permalink
  61. implicit final val self: ActorRef

    Permalink

    The 'self' field holds the ActorRef for this actor.

    The 'self' field holds the ActorRef for this actor.

    Can be used to send messages to itself:

    self ! message
    

    Definition Classes
    Actor
  62. def sendGracefulShutdownToCoordinator(): Unit

    Permalink
  63. final def sender(): ActorRef

    Permalink

    The reference sender Actor of the last received message.

    The reference sender Actor of the last received message. Is defined if the message was sent from another Actor, else deadLetters in akka.actor.ActorSystem.

    WARNING: Only valid within the Actor itself, so do not close over it and publish it to other threads!

    Definition Classes
    Actor
  64. var shardBuffers: Map[ShardId, Vector[(Msg, ActorRef)]]

    Permalink
  65. var shards: Map[ShardId, ActorRef]

    Permalink
  66. var shardsByRef: Map[ActorRef, ShardId]

    Permalink
  67. def supervisorStrategy: SupervisorStrategy

    Permalink

    User overridable definition the strategy to use for supervising child actors.

    User overridable definition the strategy to use for supervising child actors.

    Definition Classes
    Actor
  68. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  70. def totalBufferSize: Int

    Permalink
  71. def unhandled(message: Any): Unit

    Permalink

    User overridable callback.

    User overridable callback.

    Is called when a message isn't handled by the current behavior of the actor by default it fails with either a akka.actor.DeathPactException (in case of an unhandled akka.actor.Terminated message) or publishes an akka.actor.UnhandledMessage to the actor's system's akka.event.EventStream

    Definition Classes
    Actor
  72. final def wait(): Unit

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

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

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

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

Inherited from ActorLogging

Inherited from Actor

Inherited from AnyRef

Inherited from Any

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

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

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

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

Ungrouped