Class Shard

    • Constructor Detail

      • Shard

        public Shard​(java.lang.String typeName,
                     java.lang.String shardId,
                     scala.Function1<java.lang.String,​Props> entityProps,
                     ClusterShardingSettings settings,
                     scala.PartialFunction<java.lang.Object,​scala.Tuple2<java.lang.String,​java.lang.Object>> extractEntityId,
                     scala.Function1<java.lang.Object,​java.lang.String> extractShardId,
                     java.lang.Object handOffStopMessage,
                     scala.Option<RememberEntitiesProvider> rememberEntitiesProvider)
    • Method Detail

      • props

        public static Props props​(java.lang.String typeName,
                                  java.lang.String shardId,
                                  scala.Function1<java.lang.String,​Props> entityProps,
                                  ClusterShardingSettings settings,
                                  scala.PartialFunction<java.lang.Object,​scala.Tuple2<java.lang.String,​java.lang.Object>> extractEntityId,
                                  scala.Function1<java.lang.Object,​java.lang.String> extractShardId,
                                  java.lang.Object handOffStopMessage,
                                  scala.Option<RememberEntitiesProvider> rememberEntitiesProvider)
      • context

        public ActorContext context()
        Description copied from interface: Actor
        Scala API: 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!

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

        Specified by:
        context in interface Actor
        Specified by:
        context in interface StashSupport
      • self

        public final ActorRef self()
        Description copied from interface: Actor
        The 'self' field holds the ActorRef for this actor.

        Can be used to send messages to itself:
         self ! message
         
        Specified by:
        self in interface Actor
        Specified by:
        self in interface StashSupport
      • akka$actor$Actor$_setter_$context_$eq

        protected void akka$actor$Actor$_setter_$context_$eq​(ActorContext x$1)
        Description copied from interface: Actor
        Scala API: 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!

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

        Specified by:
        akka$actor$Actor$_setter_$context_$eq in interface Actor
      • akka$actor$Actor$_setter_$self_$eq

        protected final void akka$actor$Actor$_setter_$self_$eq​(ActorRef x$1)
        Description copied from interface: Actor
        The 'self' field holds the ActorRef for this actor.

        Can be used to send messages to itself:
         self ! message
         
        Specified by:
        akka$actor$Actor$_setter_$self_$eq in interface Actor
      • receive

        public scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> receive()
        Description copied from interface: Actor
        Scala API: This defines the initial actor behavior, it must return a partial function with the actor logic.
        Specified by:
        receive in interface Actor
      • preStart

        public void preStart()
        Description copied from interface: Actor
        User overridable callback.

        Is called when an Actor is started. Actors are automatically started asynchronously when created. Empty default implementation.
        Specified by:
        preStart in interface Actor
      • acquireLeaseIfNeeded

        public void acquireLeaseIfNeeded()
      • tryLoadRememberedEntities

        public void tryLoadRememberedEntities()
      • awaitingRememberedEntities

        public scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> awaitingRememberedEntities()
      • loadingEntityIdsFailed

        public void loadingEntityIdsFailed()
      • onEntitiesRemembered

        public void onEntitiesRemembered​(scala.collection.immutable.Set<java.lang.String> ids)
      • idle

        public scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> idle()
      • rememberUpdate

        public void rememberUpdate​(scala.collection.immutable.Set<java.lang.String> add,
                                   scala.collection.immutable.Set<java.lang.String> remove)
      • rememberUpdate$default$1

        public scala.collection.immutable.Set<java.lang.String> rememberUpdate$default$1()
      • rememberUpdate$default$2

        public scala.collection.immutable.Set<java.lang.String> rememberUpdate$default$2()
      • sendToRememberStore

        public void sendToRememberStore​(ActorRef store,
                                        scala.collection.immutable.Set<java.lang.String> storingStarts,
                                        scala.collection.immutable.Set<java.lang.String> storingStops)
      • onUpdateDone

        public void onUpdateDone​(scala.collection.immutable.Set<java.lang.String> starts,
                                 scala.collection.immutable.Set<java.lang.String> stops)
      • entityTerminated

        public void entityTerminated​(ActorRef ref)
      • touchLastMessageTimestamp

        public void touchLastMessageTimestamp​(java.lang.String id)
      • passivateCompleted

        public void passivateCompleted​(java.lang.String entityId)
      • getOrCreateEntity

        public ActorRef getOrCreateEntity​(java.lang.String id)
      • entityCreated

        public int entityCreated​(java.lang.String id)
        Called when an entity has been created. Returning the number of active entities.
      • appendToMessageBuffer

        public void appendToMessageBuffer​(java.lang.String id,
                                          java.lang.Object msg,
                                          ActorRef snd)
      • sendMsgBuffer

        public void sendMsgBuffer​(java.lang.String entityId)
      • dropBufferFor

        public void dropBufferFor​(java.lang.String entityId,
                                  java.lang.String reason)
      • postStop

        public void postStop()
        Description copied from interface: Actor
        User overridable callback.

        Is called asynchronously after 'actor.stop()' is invoked. Empty default implementation.
        Specified by:
        postStop in interface Actor
        Specified by:
        postStop in interface UnrestrictedStash