Package akka.dispatch

Class MessageDispatcher

  • All Implemented Interfaces:
    BatchingExecutor, java.util.concurrent.Executor, scala.concurrent.ExecutionContext, scala.concurrent.ExecutionContextExecutor
    Direct Known Subclasses:
    CallingThreadDispatcher, Dispatcher

    public abstract class MessageDispatcher
    extends java.lang.Object
    implements BatchingExecutor, scala.concurrent.ExecutionContextExecutor
    • Method Detail

      • UNSCHEDULED

        public static int UNSCHEDULED()
      • SCHEDULED

        public static int SCHEDULED()
      • RESCHEDULED

        public static int RESCHEDULED()
      • debug

        public static final boolean debug()
      • printActors

        public static void printActors()
      • akka$dispatch$BatchingExecutor$$_tasksLocal

        public static java.lang.ThreadLocal<BatchingExecutor.AbstractBatch> akka$dispatch$BatchingExecutor$$_tasksLocal()
      • akka$dispatch$BatchingExecutor$$_blockContext

        public static java.lang.ThreadLocal<scala.concurrent.BlockContext> akka$dispatch$BatchingExecutor$$_blockContext()
      • execute

        public static void execute​(java.lang.Runnable runnable)
      • batchable

        public static boolean batchable​(java.lang.Runnable runnable)
      • akka$dispatch$BatchingExecutor$_setter_$akka$dispatch$BatchingExecutor$$_tasksLocal_$eq

        protected abstract static void akka$dispatch$BatchingExecutor$_setter_$akka$dispatch$BatchingExecutor$$_tasksLocal_$eq​(java.lang.ThreadLocal<BatchingExecutor.AbstractBatch> x$1)
      • akka$dispatch$BatchingExecutor$_setter_$akka$dispatch$BatchingExecutor$$_blockContext_$eq

        protected abstract static void akka$dispatch$BatchingExecutor$_setter_$akka$dispatch$BatchingExecutor$$_blockContext_$eq​(java.lang.ThreadLocal<scala.concurrent.BlockContext> x$1)
      • prepare

        public static scala.concurrent.ExecutionContext prepare()
      • inhabitants

        public final long inhabitants()
      • createMailbox

        protected abstract Mailbox createMailbox​(Cell actor,
                                                 MailboxType mailboxType)
        Creates and returns a mailbox for the given actor.
        Parameters:
        actor - (undocumented)
        mailboxType - (undocumented)
        Returns:
        (undocumented)
      • id

        public abstract java.lang.String id()
        Identifier of this dispatcher, corresponds to the full key of the dispatcher configuration.
        Returns:
        (undocumented)
      • attach

        public final void attach​(ActorCell actor)
        Attaches the specified actor instance to this dispatcher, which includes scheduling it to run for the first time (Create() is expected to have been enqueued by the ActorCell upon mailbox creation).
        Parameters:
        actor - (undocumented)
      • detach

        public final void detach​(ActorCell actor)
        Detaches the specified actor instance from this dispatcher
        Parameters:
        actor - (undocumented)
      • reportFailure

        public void reportFailure​(java.lang.Throwable t)
        Specified by:
        reportFailure in interface scala.concurrent.ExecutionContext
      • register

        protected void register​(ActorCell actor)
        If you override it, you must call it. But only ever once. See "attach" for only invocation.

        INTERNAL API

        Parameters:
        actor - (undocumented)
      • unregister

        protected void unregister​(ActorCell actor)
        If you override it, you must call it. But only ever once. See "detach" for the only invocation

        INTERNAL API

        Parameters:
        actor - (undocumented)
      • shutdownTimeout

        protected abstract scala.concurrent.duration.FiniteDuration shutdownTimeout()
        When the dispatcher no longer has any actors registered, how long will it wait until it shuts itself down, defaulting to your akka configs "akka.actor.default-dispatcher.shutdown-timeout" or default specified in reference.conf

        INTERNAL API

        Returns:
        (undocumented)
      • suspend

        protected void suspend​(ActorCell actor)
        After the call to this method, the dispatcher mustn't begin any new message processing for the specified reference
        Parameters:
        actor - (undocumented)
      • resume

        protected void resume​(ActorCell actor)
      • systemDispatch

        protected abstract void systemDispatch​(ActorCell receiver,
                                               SystemMessage invocation)
        Will be called when the dispatcher is to queue an invocation for execution

        INTERNAL API

        Parameters:
        receiver - (undocumented)
        invocation - (undocumented)
      • dispatch

        protected abstract void dispatch​(ActorCell receiver,
                                         Envelope invocation)
        Will be called when the dispatcher is to queue an invocation for execution

        INTERNAL API

        Parameters:
        receiver - (undocumented)
        invocation - (undocumented)
      • registerForExecution

        protected abstract boolean registerForExecution​(Mailbox mbox,
                                                        boolean hasMessageHint,
                                                        boolean hasSystemMessageHint)
        Suggest to register the provided mailbox for execution

        INTERNAL API

        Parameters:
        mbox - (undocumented)
        hasMessageHint - (undocumented)
        hasSystemMessageHint - (undocumented)
        Returns:
        (undocumented)
      • throughput

        protected abstract int throughput()
        INTERNAL API
        Returns:
        (undocumented)
      • throughputDeadlineTime

        protected abstract scala.concurrent.duration.Duration throughputDeadlineTime()
        INTERNAL API
        Returns:
        (undocumented)
      • isThroughputDeadlineTimeDefined

        protected final boolean isThroughputDeadlineTimeDefined()
        INTERNAL API
        Returns:
        (undocumented)
      • executeTask

        protected abstract void executeTask​(TaskInvocation invocation)
        INTERNAL API
        Parameters:
        invocation - (undocumented)
      • shutdown

        protected abstract void shutdown()
        Called one time every time an actor is detached from this dispatcher and this dispatcher has no actors left attached Must be idempotent

        INTERNAL API