Package akka.actor

Class RepointableActorRef

  • All Implemented Interfaces:
    ActorRefScope, RepointableRef, ScalaActorRef, java.io.Serializable, java.lang.Comparable<ActorRef>, scala.Serializable
    Direct Known Subclasses:
    RoutedActorRef

    public class RepointableActorRef
    extends ActorRefWithCell
    implements RepointableRef
    Initialize: make a dummy cell which holds just a mailbox, then tell our supervisor that we exist so that he can create the real Cell in handleSupervise().

    Call twice on your own peril!

    This is protected so that others can have different initialization.

    See Also:
    Serialized Form
    • Method Detail

      • getChild

        public InternalActorRef getChild​(scala.collection.Iterator<java.lang.String> name)
        Description copied from class: InternalActorRef
        Obtain ActorRef by possibly traversing the actor tree or looking it up at some provider-specific location. This method shall return the end result, i.e. not only the next step in the look-up; this will typically involve recursive invocation. A path element of ".." signifies the parent, a trailing "" element must be disregarded. If the requested path does not exist, return Nobody.
        Specified by:
        getChild in class InternalActorRef
        Parameters:
        name - (undocumented)
        Returns:
        (undocumented)
      • getSingleChild

        public InternalActorRef getSingleChild​(java.lang.String name)
        Method for looking up a single child beneath this actor. It is racy if called from the outside.
        Specified by:
        getSingleChild in class ActorRefWithCell
        Parameters:
        name - (undocumented)
        Returns:
        (undocumented)
      • initialize

        public RepointableActorRef initialize​(boolean async)
        Initialize: make a dummy cell which holds just a mailbox, then tell our supervisor that we exist so that he can create the real Cell in handleSupervise().

        Call twice on your own peril!

        This is protected so that others can have different initialization.

        Parameters:
        async - (undocumented)
        Returns:
        (undocumented)
      • isLocal

        public boolean isLocal()
        Description copied from class: InternalActorRef
        Scope: if this ref points to an actor which resides within the same JVM, i.e. whose mailbox is directly reachable etc.
        Specified by:
        isLocal in interface ActorRefScope
        Specified by:
        isLocal in class InternalActorRef
        Returns:
        (undocumented)
      • isTerminated

        public boolean isTerminated()
        Deprecated.
        Use context.watch(actor) and receive Terminated(actor). Since 2.2.
        Description copied from class: InternalActorRef
        INTERNAL API: Returns &ldquo;true&rdquo; if the actor is locally known to be terminated, &ldquo;false&rdquo; if alive or uncertain.
        Specified by:
        isTerminated in class InternalActorRef
        Returns:
        (undocumented)
      • lookup

        public Cell lookup()
      • newCell

        public Cell newCell​(UnstartedCell old)
        This is called by activate() to obtain the cell which is to replace the unstarted cell. The cell must be fully functional.
        Parameters:
        old - (undocumented)
        Returns:
        (undocumented)
      • point

        public RepointableActorRef point​(boolean catchFailures)
        This method is supposed to be called by the supervisor in handleSupervise() to replace the UnstartedCell with the real one. It assumes no concurrent modification of the underlying field, though it is safe to send messages at any time.
        Parameters:
        catchFailures - (undocumented)
        Returns:
        (undocumented)
      • props

        public Props props()
      • resume

        public void resume​(java.lang.Throwable causedByFailure)
        Specified by:
        resume in class InternalActorRef
      • swapCell

        public final Cell swapCell​(Cell next)
      • swapLookup

        public final Cell swapLookup​(Cell next)
      • writeReplace

        protected java.lang.Object writeReplace()
                                         throws java.io.ObjectStreamException
        Throws:
        java.io.ObjectStreamException