akka.testkit

CallingThreadDispatcher

class CallingThreadDispatcher extends MessageDispatcher

Dispatcher which runs invocations on the current thread only. This dispatcher does not create any new threads, but it can be used from different threads concurrently for the same actor. The dispatch strategy is to run on the current thread unless the target actor is either suspendSwitch or already running on the current thread (if it is running on a different thread, then this thread will block until that other invocation is finished); if the invocation is not run, it is queued in a thread-local queue to be executed once the active invocation further up the call stack finishes. This leads to completely deterministic execution order if only one thread is used.

Suspending and resuming are global actions for one actor, meaning they can affect different threads, which leads to complications. If messages are queued (thread-locally) during the suspendSwitch period, the only thread to run them upon resume is the thread actually calling the resume method. Hence, all thread-local queues which are not currently being drained (possible, since suspend-queue-resume might happen entirely during an invocation on a different thread) are scooped up into the current thread-local queue which is then executed. It is possible to suspend an actor from within its call stack.

Source
CallingThreadDispatcher.scala
Since

1.1

Linear Supertypes
MessageDispatcher, ExecutionContextExecutor, ExecutionContext, BatchingExecutor, Executor, AbstractMessageDispatcher, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CallingThreadDispatcher
  2. MessageDispatcher
  3. ExecutionContextExecutor
  4. ExecutionContext
  5. BatchingExecutor
  6. Executor
  7. AbstractMessageDispatcher
  8. AnyRef
  9. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CallingThreadDispatcher(_configurator: MessageDispatcherConfigurator)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from CallingThreadDispatcher to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (CallingThreadDispatcher, B)

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

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. final def attach(actor: ActorCell): Unit

    Definition Classes
    MessageDispatcher
  10. def batchable(runnable: Runnable): Boolean

    Definition Classes
    BatchingExecutor
  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. val configurator: MessageDispatcherConfigurator

    Definition Classes
    MessageDispatcher
  13. def createMailbox(actor: Cell, mailboxType: MailboxType): CallingThreadMailbox

    Attributes
    protected[akka]
    Definition Classes
    CallingThreadDispatcher → MessageDispatcher
  14. final def detach(actor: ActorCell): Unit

    Definition Classes
    MessageDispatcher
  15. def dispatch(receiver: ActorCell, handle: Envelope): Unit

    Attributes
    protected[akka]
    Definition Classes
    CallingThreadDispatcher → MessageDispatcher
  16. def ensuring(cond: (CallingThreadDispatcher) ⇒ Boolean, msg: ⇒ Any): CallingThreadDispatcher

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

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

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

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

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

    Definition Classes
    AnyRef → Any
  22. val eventStream: EventStream

    Definition Classes
    MessageDispatcher
  23. def execute(runnable: Runnable): Unit

    Definition Classes
    BatchingExecutor → Executor
  24. def executeTask(invocation: TaskInvocation): Unit

    Attributes
    protected[akka]
    Definition Classes
    CallingThreadDispatcher → MessageDispatcher
  25. def finalize(): Unit

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

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

    Definition Classes
    AnyRef → Any
  28. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  29. def id: String

    Definition Classes
    CallingThreadDispatcher → MessageDispatcher
  30. final def inhabitants: Long

    Definition Classes
    MessageDispatcher
  31. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  32. final val isThroughputDeadlineTimeDefined: Boolean

    Attributes
    protected[akka]
    Definition Classes
    MessageDispatcher
  33. val log: LoggingAdapter

  34. val mailboxes: Mailboxes

    Definition Classes
    MessageDispatcher
  35. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  36. final def notify(): Unit

    Definition Classes
    AnyRef
  37. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  38. def prepare(): ExecutionContext

    Definition Classes
    ExecutionContext
  39. def register(actor: ActorCell): Unit

    Attributes
    protected[akka]
    Definition Classes
    CallingThreadDispatcher → MessageDispatcher
  40. def registerForExecution(mbox: Mailbox, hasMessageHint: Boolean, hasSystemMessageHint: Boolean): Boolean

    Attributes
    protected[akka]
    Definition Classes
    CallingThreadDispatcher → MessageDispatcher
  41. def reportFailure(t: Throwable): Unit

    Definition Classes
    MessageDispatcher → ExecutionContext
  42. def resume(actor: ActorCell): Unit

    Attributes
    protected[akka]
    Definition Classes
    CallingThreadDispatcher → MessageDispatcher
  43. def shutdown(): Unit

    Attributes
    protected[akka]
    Definition Classes
    CallingThreadDispatcher → MessageDispatcher
  44. def shutdownTimeout: FiniteDuration

    Attributes
    protected[akka]
    Definition Classes
    CallingThreadDispatcher → MessageDispatcher
  45. def suspend(actor: ActorCell): Unit

    Attributes
    protected[akka]
    Definition Classes
    CallingThreadDispatcher → MessageDispatcher
  46. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  47. def systemDispatch(receiver: ActorCell, message: SystemMessage): Unit

    Attributes
    protected[akka]
    Definition Classes
    CallingThreadDispatcher → MessageDispatcher
  48. def throughput: Int

    Attributes
    protected[akka]
    Definition Classes
    CallingThreadDispatcher → MessageDispatcher
  49. def throughputDeadlineTime: FiniteDuration

    Attributes
    protected[akka]
    Definition Classes
    CallingThreadDispatcher → MessageDispatcher
  50. def toString(): String

    Definition Classes
    AnyRef → Any
  51. final def unbatchedExecute(r: Runnable): Unit

    Attributes
    protected
    Definition Classes
    MessageDispatcher → BatchingExecutor
  52. def unregister(actor: ActorCell): Unit

    Attributes
    protected[akka]
    Definition Classes
    CallingThreadDispatcher → MessageDispatcher
  53. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. def [B](y: B): (CallingThreadDispatcher, B)

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

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from CallingThreadDispatcher to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (callingThreadDispatcher: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from CallingThreadDispatcher to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (callingThreadDispatcher: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: CallingThreadDispatcher

    Implicit information
    This member is added by an implicit conversion from CallingThreadDispatcher to ArrowAssoc[CallingThreadDispatcher] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (callingThreadDispatcher: ArrowAssoc[CallingThreadDispatcher]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: CallingThreadDispatcher

    Implicit information
    This member is added by an implicit conversion from CallingThreadDispatcher to Ensuring[CallingThreadDispatcher] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (callingThreadDispatcher: Ensuring[CallingThreadDispatcher]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from MessageDispatcher

Inherited from ExecutionContextExecutor

Inherited from ExecutionContext

Inherited from BatchingExecutor

Inherited from Executor

Inherited from AbstractMessageDispatcher

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from CallingThreadDispatcher to StringAdd

Inherited by implicit conversion any2stringfmt from CallingThreadDispatcher to StringFormat

Inherited by implicit conversion any2ArrowAssoc from CallingThreadDispatcher to ArrowAssoc[CallingThreadDispatcher]

Inherited by implicit conversion any2Ensuring from CallingThreadDispatcher to Ensuring[CallingThreadDispatcher]

Ungrouped