Package akka.actor

Class ActorCell

    • Method Detail

      • contextStack

        public static java.lang.ThreadLocal<scala.collection.immutable.List<ActorContext>> contextStack()
      • emptyCancellable

        public static final Cancellable emptyCancellable()
      • emptyBehaviorStack

        public static final scala.collection.immutable.List<scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit>> emptyBehaviorStack()
      • emptyActorRefSet

        public static final scala.collection.immutable.Set<ActorRef> emptyActorRefSet()
      • terminatedProps

        public static final Props terminatedProps()
      • undefinedUid

        public static final int undefinedUid()
      • newUid

        public static final int newUid()
      • splitNameAndUid

        public static final scala.Tuple2<java.lang.String,​java.lang.Object> splitNameAndUid​(java.lang.String name)
      • DefaultState

        public static final int DefaultState()
      • SuspendedState

        public static final int SuspendedState()
      • SuspendedWaitForChildrenState

        public static final int SuspendedWaitForChildrenState()
      • actorOf

        public abstract static ActorRef actorOf​(Props props)
      • actorOf

        public abstract static ActorRef actorOf​(Props props,
                                                java.lang.String name)
      • actorFor

        public static ActorRef actorFor​(java.lang.String path)
      • actorFor

        public static ActorRef actorFor​(scala.collection.Iterable<java.lang.String> path)
      • actorFor

        public static ActorRef actorFor​(java.lang.Iterable<java.lang.String> path)
      • actorSelection

        public static ActorSelection actorSelection​(java.lang.String path)
      • stop

        public abstract static void stop​(ActorRef actor)
      • receiveTimeout

        public abstract static scala.concurrent.duration.Duration receiveTimeout()
      • setReceiveTimeout

        public abstract static void setReceiveTimeout​(scala.concurrent.duration.Duration timeout)
      • children

        public abstract static scala.collection.immutable.Iterable<ActorRef> children()
      • child

        public abstract static scala.Option<ActorRef> child​(java.lang.String name)
      • watchWith

        public abstract static ActorRef watchWith​(ActorRef subject,
                                                  java.lang.Object msg)
      • writeObject

        protected static final void writeObject​(java.io.ObjectOutputStream o)
      • getChildren

        public abstract static java.lang.Iterable<ActorRef> getChildren()
      • getChild

        public abstract static ActorRef getChild​(java.lang.String name)
      • getSender

        public static ActorRef getSender()
      • findChild

        public abstract static java.util.Optional<ActorRef> findChild​(java.lang.String name)
      • getReceiveTimeout

        public static java.time.Duration getReceiveTimeout()
      • setReceiveTimeout

        public static void setReceiveTimeout​(java.time.Duration timeout)
      • cancelReceiveTimeout

        public static void cancelReceiveTimeout()
      • start

        public abstract static Cell start()
      • suspend

        public abstract static void suspend()
      • resume

        public abstract static void resume​(java.lang.Throwable causedByFailure)
      • restart

        public abstract static void restart​(java.lang.Throwable cause)
      • stop

        public abstract static void stop()
      • isTerminated

        public abstract static boolean isTerminated()
      • getChildByName

        public abstract static scala.Option<ChildStats> getChildByName​(java.lang.String name)
      • getSingleChild

        public abstract static InternalActorRef getSingleChild​(java.lang.String name)
      • sendMessage

        public abstract static void sendMessage​(Envelope msg)
      • sendMessage

        public static final void sendMessage​(java.lang.Object message,
                                             ActorRef sender)
      • sendSystemMessage

        public abstract static void sendSystemMessage​(SystemMessage msg)
      • hasMessages

        public abstract static boolean hasMessages()
      • numberOfMessages

        public abstract static int numberOfMessages()
      • akka$actor$dungeon$ReceiveTimeout$$receiveTimeoutData

        public static scala.Tuple2<scala.concurrent.duration.Duration,​Cancellable> akka$actor$dungeon$ReceiveTimeout$$receiveTimeoutData()
      • akka$actor$dungeon$ReceiveTimeout$$receiveTimeoutData_$eq

        public static void akka$actor$dungeon$ReceiveTimeout$$receiveTimeoutData_$eq​(scala.Tuple2<scala.concurrent.duration.Duration,​Cancellable> x$1)
      • checkReceiveTimeout

        public static final void checkReceiveTimeout​(boolean reschedule)
      • checkReceiveTimeout$default$1

        public static final boolean checkReceiveTimeout$default$1()
      • akka$actor$dungeon$Children$$_childrenRefsDoNotCallMeDirectly

        public static ChildrenContainer akka$actor$dungeon$Children$$_childrenRefsDoNotCallMeDirectly()
      • akka$actor$dungeon$Children$$_childrenRefsDoNotCallMeDirectly_$eq

        public static void akka$actor$dungeon$Children$$_childrenRefsDoNotCallMeDirectly_$eq​(ChildrenContainer x$1)
      • attachChild

        public static ActorRef attachChild​(Props props,
                                           boolean systemService)
      • attachChild

        public static ActorRef attachChild​(Props props,
                                           java.lang.String name,
                                           boolean systemService)
      • akka$actor$dungeon$Children$$_functionRefsDoNotCallMeDirectly

        public static scala.collection.immutable.Map<java.lang.String,​FunctionRef> akka$actor$dungeon$Children$$_functionRefsDoNotCallMeDirectly()
      • akka$actor$dungeon$Children$$_functionRefsDoNotCallMeDirectly_$eq

        public static void akka$actor$dungeon$Children$$_functionRefsDoNotCallMeDirectly_$eq​(scala.collection.immutable.Map<java.lang.String,​FunctionRef> x$1)
      • getFunctionRefOrNobody

        public static InternalActorRef getFunctionRefOrNobody​(java.lang.String name,
                                                              int uid)
      • getFunctionRefOrNobody$default$2

        public static int getFunctionRefOrNobody$default$2()
      • addFunctionRef

        public static FunctionRef addFunctionRef​(scala.Function2<ActorRef,​java.lang.Object,​scala.runtime.BoxedUnit> f,
                                                 java.lang.String name)
      • addFunctionRef$default$2

        public static java.lang.String addFunctionRef$default$2()
      • removeFunctionRef

        public static boolean removeFunctionRef​(FunctionRef ref)
      • stopFunctionRefs

        protected static void stopFunctionRefs()
      • akka$actor$dungeon$Children$$_nextNameDoNotCallMeDirectly

        public static long akka$actor$dungeon$Children$$_nextNameDoNotCallMeDirectly()
      • akka$actor$dungeon$Children$$_nextNameDoNotCallMeDirectly_$eq

        public static void akka$actor$dungeon$Children$$_nextNameDoNotCallMeDirectly_$eq​(long x$1)
      • randomName

        protected static final java.lang.String randomName​(java.lang.StringBuilder sb)
      • randomName

        protected static final java.lang.String randomName()
      • reserveChild

        public static final boolean reserveChild​(java.lang.String name)
      • unreserveChild

        protected static final boolean unreserveChild​(java.lang.String name)
      • setTerminated

        protected static final void setTerminated()
      • isNormal

        protected static boolean isNormal()
      • isTerminating

        protected static boolean isTerminating()
      • suspendChildren

        protected static void suspendChildren​(scala.collection.immutable.Set<ActorRef> exceptFor)
      • suspendChildren$default$1

        protected static scala.collection.immutable.Set<ActorRef> suspendChildren$default$1()
      • resumeChildren

        protected static void resumeChildren​(java.lang.Throwable causedByFailure,
                                             ActorRef perp)
      • getAllChildStats

        protected static scala.collection.immutable.Iterable<ChildRestartStats> getAllChildStats()
      • akka$actor$dungeon$Dispatch$$_mailboxDoNotCallMeDirectly

        public static Mailbox akka$actor$dungeon$Dispatch$$_mailboxDoNotCallMeDirectly()
      • akka$actor$dungeon$Dispatch$$_mailboxDoNotCallMeDirectly_$eq

        public static void akka$actor$dungeon$Dispatch$$_mailboxDoNotCallMeDirectly_$eq​(Mailbox x$1)
      • mailbox

        public static final Mailbox mailbox()
      • swapMailbox

        public static final Mailbox swapMailbox​(Mailbox newMailbox)
      • init

        public static final Dispatch init​(boolean sendSupervise,
                                          MailboxType mailboxType)
      • initWithFailure

        public static final Dispatch initWithFailure​(java.lang.Throwable failure)
      • akka$actor$dungeon$DeathWatch$$watching

        public static scala.collection.immutable.Map<ActorRef,​scala.Option<java.lang.Object>> akka$actor$dungeon$DeathWatch$$watching()
      • akka$actor$dungeon$DeathWatch$$watching_$eq

        public static void akka$actor$dungeon$DeathWatch$$watching_$eq​(scala.collection.immutable.Map<ActorRef,​scala.Option<java.lang.Object>> x$1)
      • akka$actor$dungeon$DeathWatch$$watchedBy

        public static scala.collection.immutable.Set<ActorRef> akka$actor$dungeon$DeathWatch$$watchedBy()
      • akka$actor$dungeon$DeathWatch$$watchedBy_$eq

        public static void akka$actor$dungeon$DeathWatch$$watchedBy_$eq​(scala.collection.immutable.Set<ActorRef> x$1)
      • akka$actor$dungeon$DeathWatch$$terminatedQueued

        public static scala.collection.immutable.Set<ActorRef> akka$actor$dungeon$DeathWatch$$terminatedQueued()
      • akka$actor$dungeon$DeathWatch$$terminatedQueued_$eq

        public static void akka$actor$dungeon$DeathWatch$$terminatedQueued_$eq​(scala.collection.immutable.Set<ActorRef> x$1)
      • isWatching

        public static boolean isWatching​(ActorRef ref)
      • receivedTerminated

        protected static void receivedTerminated​(Terminated t)
      • watchedActorTerminated

        protected static void watchedActorTerminated​(ActorRef actor,
                                                     boolean existenceConfirmed,
                                                     boolean addressTerminated)
      • terminatedQueuedFor

        public static void terminatedQueuedFor​(ActorRef subject)
      • tellWatchersWeDied

        protected static void tellWatchersWeDied()
      • unwatchWatchedActors

        protected static void unwatchWatchedActors​(Actor actor)
      • addWatcher

        protected static void addWatcher​(ActorRef watchee,
                                         ActorRef watcher)
      • remWatcher

        protected static void remWatcher​(ActorRef watchee,
                                         ActorRef watcher)
      • addressTerminated

        protected static void addressTerminated​(Address address)
      • akka$actor$dungeon$FaultHandling$$_failed

        public static ActorRef akka$actor$dungeon$FaultHandling$$_failed()
      • akka$actor$dungeon$FaultHandling$$_failed_$eq

        public static void akka$actor$dungeon$FaultHandling$$_failed_$eq​(ActorRef x$1)
      • faultRecreate

        protected static void faultRecreate​(java.lang.Throwable cause)
      • faultSuspend

        protected static void faultSuspend()
      • faultResume

        protected static void faultResume​(java.lang.Throwable causedByFailure)
      • faultCreate

        protected static void faultCreate()
      • terminate

        protected static void terminate()
      • handleInvokeFailure

        public static final void handleInvokeFailure​(scala.collection.immutable.Iterable<ActorRef> childrenNotToSuspend,
                                                     java.lang.Throwable t)
      • handleFailure

        protected static final void handleFailure​(Failed f)
      • handleChildTerminated

        protected static final void handleChildTerminated​(ActorRef child)
      • handleNonFatalOrInterruptedException

        protected static final scala.PartialFunction<java.lang.Throwable,​scala.runtime.BoxedUnit> handleNonFatalOrInterruptedException​(scala.Function1<java.lang.Throwable,​scala.runtime.BoxedUnit> thunk)
      • system

        public ActorSystemImpl system()
        Description copied from interface: ActorContext
        The system that the actor belongs to. Importing this member will place an implicit ActorSystem in scope.

        This method is thread-safe and can be called from other threads than the ordinary actor message processing thread, such as CompletionStage and Future callbacks.

        Specified by:
        system in interface ActorContext
        Specified by:
        system in interface Cell
        Returns:
        (undocumented)
      • self

        public InternalActorRef self()
        Description copied from interface: ActorContext
        The ActorRef representing this actor

        This method is thread-safe and can be called from other threads than the ordinary actor message processing thread, such as CompletionStage and Future callbacks.

        Specified by:
        self in interface ActorContext
        Specified by:
        self in interface Cell
        Returns:
        (undocumented)
      • props

        public final Props props()
        Description copied from interface: ActorContext
        Retrieve the Props which were used to create this actor.

        This method is thread-safe and can be called from other threads than the ordinary actor message processing thread, such as CompletionStage and Future callbacks.

        Specified by:
        props in interface ActorContext
        Specified by:
        props in interface Cell
        Returns:
        (undocumented)
      • dispatcher

        public MessageDispatcher dispatcher()
        Description copied from interface: ActorContext
        Returns the dispatcher (MessageDispatcher) that is used for this Actor. Importing this member will place an implicit ExecutionContext in scope.

        This method is thread-safe and can be called from other threads than the ordinary actor message processing thread, such as CompletionStage and Future callbacks.

        Specified by:
        dispatcher in interface ActorContext
        Specified by:
        dispatcher in interface ActorRefFactory
        Returns:
        (undocumented)
      • parent

        public InternalActorRef parent()
        Description copied from interface: ActorContext
        Returns the supervising parent ActorRef.

        This method is thread-safe and can be called from other threads than the ordinary actor message processing thread, such as CompletionStage and Future callbacks.

        Specified by:
        parent in interface ActorContext
        Specified by:
        parent in interface Cell
        Returns:
        (undocumented)
      • isLocal

        public final boolean isLocal()
        Description copied from interface: Cell
        Returns true if the actor is local, i.e. if it is actually scheduled on a Thread in the current JVM when run.
        Specified by:
        isLocal in interface Cell
        Returns:
        (undocumented)
      • uid

        protected int uid()
      • actor

        public Actor actor()
      • actor_$eq

        protected void actor_$eq​(Actor a)
      • currentMessage

        public Envelope currentMessage()
      • currentMessage_$eq

        public void currentMessage_$eq​(Envelope x$1)
      • getParent

        public final InternalActorRef getParent()
        Description copied from interface: AbstractActor.ActorContext
        Returns the supervisor of this actor.

        Same as parent().

        This method is thread-safe and can be called from other threads than the ordinary actor message processing thread, such as CompletionStage callbacks.

        Specified by:
        getParent in interface AbstractActor.ActorContext
        Returns:
        (undocumented)
      • getSystem

        public final ActorSystemImpl getSystem()
        Description copied from interface: AbstractActor.ActorContext
        Returns the system this actor is running in.

        Same as system()

        This method is thread-safe and can be called from other threads than the ordinary actor message processing thread, such as CompletionStage callbacks.

        Specified by:
        getSystem in interface AbstractActor.ActorContext
        Returns:
        (undocumented)
      • getDispatcher

        public final scala.concurrent.ExecutionContextExecutor getDispatcher()
        Description copied from interface: AbstractActor.ActorContext
        Returns the dispatcher (MessageDispatcher) that is used for this Actor.

        This method is thread-safe and can be called from other threads than the ordinary actor message processing thread, such as CompletionStage and Future callbacks.

        Specified by:
        getDispatcher in interface AbstractActor.ActorContext
        Returns:
        (undocumented)
      • getSelf

        public final ActorRef getSelf()
        Description copied from interface: AbstractActor.ActorContext
        The ActorRef representing this actor

        This method is thread-safe and can be called from other threads than the ordinary actor message processing thread, such as CompletionStage and Future callbacks.

        Specified by:
        getSelf in interface AbstractActor.ActorContext
        Returns:
        (undocumented)
      • getProps

        public final Props getProps()
        Description copied from interface: AbstractActor.ActorContext
        Retrieve the Props which were used to create this actor.

        This method is thread-safe and can be called from other threads than the ordinary actor message processing thread, such as CompletionStage and Future callbacks.

        Specified by:
        getProps in interface AbstractActor.ActorContext
        Returns:
        (undocumented)
      • systemInvoke

        public final void systemInvoke​(SystemMessage message)
      • invoke

        public final void invoke​(Envelope messageHandle)
      • autoReceiveMessage

        public void autoReceiveMessage​(Envelope msg)
      • receiveMessage

        public final void receiveMessage​(java.lang.Object msg)
      • sender

        public final ActorRef sender()
        Description copied from interface: ActorContext
        Returns the sender 'ActorRef' of the current message.

        *Warning*: This method is not thread-safe and must not be accessed from threads other than the ordinary actor message processing thread, such as CompletionStage and Future callbacks.

        Specified by:
        sender in interface ActorContext
        Returns:
        (undocumented)
      • become

        public void become​(scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> behavior,
                           boolean discardOld)
        Description copied from interface: ActorContext
        Changes the Actor's behavior to become the new 'Receive' (PartialFunction[Any, Unit]) handler. This method acts upon the behavior stack as follows:

        - if discardOld = true it will replace the top element (i.e. the current behavior) - if discardOld = false it will keep the current behavior and push the given one atop

        The default of replacing the current behavior on the stack has been chosen to avoid memory leaks in case client code is written without consulting this documentation first (i.e. always pushing new behaviors and never issuing an unbecome())

        *Warning*: This method is not thread-safe and must not be accessed from threads other than the ordinary actor message processing thread, such as CompletionStage and Future callbacks.

        Specified by:
        become in interface ActorContext
        Parameters:
        behavior - (undocumented)
        discardOld - (undocumented)
      • become

        public void become​(Procedure<java.lang.Object> behavior)
        Description copied from interface: UntypedActorContext
        Changes the Actor's behavior to become the new 'Procedure' handler. Replaces the current behavior on the top of the behavior stack.
        Specified by:
        become in interface UntypedActorContext
        Parameters:
        behavior - (undocumented)
      • become

        public void become​(Procedure<java.lang.Object> behavior,
                           boolean discardOld)
        Description copied from interface: UntypedActorContext
        Changes the Actor's behavior to become the new 'Procedure' handler. This method acts upon the behavior stack as follows:

        - if discardOld = true it will replace the top element (i.e. the current behavior) - if discardOld = false it will keep the current behavior and push the given one atop

        The default of replacing the current behavior on the stack has been chosen to avoid memory leaks in case client code is written without consulting this documentation first (i.e. always pushing new behaviors and never issuing an unbecome())

        Specified by:
        become in interface UntypedActorContext
        Parameters:
        behavior - (undocumented)
        discardOld - (undocumented)
      • become$default$2

        public boolean become$default$2()
      • unbecome

        public void unbecome()
        Description copied from interface: ActorContext
        Reverts the Actor behavior to the previous one on the behavior stack.

        *Warning*: This method is not thread-safe and must not be accessed from threads other than the ordinary actor message processing thread, such as CompletionStage and Future callbacks.

        Specified by:
        unbecome in interface ActorContext
      • newActor

        protected Actor newActor()
      • handleSupervise

        protected void handleSupervise​(ActorRef child,
                                       boolean async)
      • clearActorCellFields

        protected final void clearActorCellFields​(ActorCell cell)
      • clearActorFields

        protected final void clearActorFields​(Actor actorInstance,
                                              boolean recreate)
      • clazz

        protected final java.lang.Class<?> clazz​(java.lang.Object o)