Packages

c

akka.dispatch

BalancingDispatcher

class BalancingDispatcher extends Dispatcher

An executor based event driven dispatcher which will try to redistribute work from busy actors to idle actors. It is assumed that all actors using the same instance of this dispatcher can process all messages that have been sent to one of the actors. I.e. the actors belong to a pool of actors, and to the client there is no guarantee about which actor instance actually processes a given message.

Although the technique used in this implementation is commonly known as "work stealing", the actual implementation is probably best described as "work donating" because the actor of which work is being stolen takes the initiative.

The preferred way of creating dispatchers is to define configuration of it and use the the lookup method in akka.dispatch.Dispatchers.

Annotations
@deprecated
Deprecated

(Since version 2.3) Use BalancingPool instead of BalancingDispatcher

Source
BalancingDispatcher.scala
See also

akka.dispatch.Dispatchers

akka.dispatch.BalancingDispatcher

Linear Supertypes
Dispatcher, MessageDispatcher, ExecutionContextExecutor, ExecutionContext, BatchingExecutor, Executor, AbstractMessageDispatcher, AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BalancingDispatcher
  2. Dispatcher
  3. MessageDispatcher
  4. ExecutionContextExecutor
  5. ExecutionContext
  6. BatchingExecutor
  7. Executor
  8. AbstractMessageDispatcher
  9. AnyRef
  10. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new BalancingDispatcher(_configurator: MessageDispatcherConfigurator, _id: String, throughput: Int, throughputDeadlineTime: Duration, _mailboxType: MailboxType, _executorServiceFactoryProvider: ExecutorServiceFactoryProvider, _shutdownTimeout: FiniteDuration, attemptTeamWork: Boolean)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from BalancingDispatcher to any2stringadd[BalancingDispatcher] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (BalancingDispatcher, B)
    Implicit
    This member is added by an implicit conversion from BalancingDispatcher to ArrowAssoc[BalancingDispatcher] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. final def attach(actor: ActorCell): Unit

    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).

    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).

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

    Override this to define which runnables will be batched.

    Override this to define which runnables will be batched.

    Definition Classes
    BatchingExecutor
  9. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. val configurator: MessageDispatcherConfigurator
    Definition Classes
    MessageDispatcher
  11. def createMailbox(actor: Cell, mailboxType: MailboxType): Mailbox

    INTERNAL API

    INTERNAL API

    Attributes
    protected[akka]
    Definition Classes
    BalancingDispatcherDispatcherMessageDispatcher
  12. final def detach(actor: ActorCell): Unit

    Detaches the specified actor instance from this dispatcher

    Detaches the specified actor instance from this dispatcher

    Definition Classes
    MessageDispatcher
  13. def dispatch(receiver: ActorCell, invocation: Envelope): Unit

    INTERNAL API

    INTERNAL API

    Attributes
    protected[akka]
    Definition Classes
    BalancingDispatcherDispatcherMessageDispatcher
  14. def ensuring(cond: (BalancingDispatcher) ⇒ Boolean, msg: ⇒ Any): BalancingDispatcher
    Implicit
    This member is added by an implicit conversion from BalancingDispatcher to Ensuring[BalancingDispatcher] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: (BalancingDispatcher) ⇒ Boolean): BalancingDispatcher
    Implicit
    This member is added by an implicit conversion from BalancingDispatcher to Ensuring[BalancingDispatcher] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean, msg: ⇒ Any): BalancingDispatcher
    Implicit
    This member is added by an implicit conversion from BalancingDispatcher to Ensuring[BalancingDispatcher] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: Boolean): BalancingDispatcher
    Implicit
    This member is added by an implicit conversion from BalancingDispatcher to Ensuring[BalancingDispatcher] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  20. val eventStream: EventStream
    Definition Classes
    MessageDispatcher
  21. def execute(runnable: Runnable): Unit
    Definition Classes
    BatchingExecutor → Executor
  22. def executeTask(invocation: TaskInvocation): Unit

    INTERNAL API

    INTERNAL API

    Attributes
    protected[akka]
    Definition Classes
    DispatcherMessageDispatcher
  23. final def executorService: ExecutorServiceDelegate
    Attributes
    protected
    Definition Classes
    Dispatcher
  24. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from BalancingDispatcher to StringFormat[BalancingDispatcher] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  26. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  27. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  28. val id: String
    Definition Classes
    DispatcherMessageDispatcher
  29. final def inhabitants: Long
    Definition Classes
    MessageDispatcher
  30. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  31. final val isThroughputDeadlineTimeDefined: Boolean

    INTERNAL API

    INTERNAL API

    Attributes
    protected[akka]
    Definition Classes
    MessageDispatcher
  32. val mailboxes: Mailboxes
    Definition Classes
    MessageDispatcher
  33. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  34. final def notify(): Unit
    Definition Classes
    AnyRef
  35. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  36. def register(actor: ActorCell): Unit

    If you override it, you must call it.

    If you override it, you must call it. But only ever once. See "attach" for only invocation.

    INTERNAL API

    Attributes
    protected[akka]
    Definition Classes
    BalancingDispatcherMessageDispatcher
  37. def registerForExecution(mbox: Mailbox, hasMessageHint: Boolean, hasSystemMessageHint: Boolean): Boolean

    Returns if it was registered

    Returns if it was registered

    INTERNAL API

    Attributes
    protected[akka]
    Definition Classes
    DispatcherMessageDispatcher
  38. def reportFailure(t: Throwable): Unit
    Definition Classes
    MessageDispatcher → ExecutionContext
  39. final def resubmitOnBlock: Boolean
    Attributes
    protected
    Definition Classes
    MessageDispatcher → BatchingExecutor
  40. def resume(actor: ActorCell): Unit
    Attributes
    protected[akka]
    Definition Classes
    MessageDispatcher
  41. def shutdown(): Unit

    INTERNAL API

    INTERNAL API

    Attributes
    protected[akka]
    Definition Classes
    DispatcherMessageDispatcher
  42. val shutdownTimeout: FiniteDuration
    Definition Classes
    DispatcherMessageDispatcher
  43. def suspend(actor: ActorCell): Unit

    After the call to this method, the dispatcher mustn't begin any new message processing for the specified reference

    After the call to this method, the dispatcher mustn't begin any new message processing for the specified reference

    Attributes
    protected[akka]
    Definition Classes
    MessageDispatcher
  44. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  45. def systemDispatch(receiver: ActorCell, invocation: SystemMessage): Unit

    INTERNAL API

    INTERNAL API

    Attributes
    protected[akka]
    Definition Classes
    DispatcherMessageDispatcher
  46. def teamWork(): Unit
    Attributes
    protected
  47. val throughput: Int
    Definition Classes
    DispatcherMessageDispatcher
  48. val throughputDeadlineTime: Duration
    Definition Classes
    DispatcherMessageDispatcher
  49. val toString: String
    Definition Classes
    Dispatcher → AnyRef → Any
  50. final def unbatchedExecute(r: Runnable): Unit
    Attributes
    protected
    Definition Classes
    MessageDispatcher → BatchingExecutor
  51. def unregister(actor: ActorCell): Unit

    If you override it, you must call it.

    If you override it, you must call it. But only ever once. See "detach" for the only invocation

    INTERNAL API

    Attributes
    protected[akka]
    Definition Classes
    BalancingDispatcherMessageDispatcher
  52. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  54. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  55. def [B](y: B): (BalancingDispatcher, B)
    Implicit
    This member is added by an implicit conversion from BalancingDispatcher to ArrowAssoc[BalancingDispatcher] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def prepare(): ExecutionContext
    Definition Classes
    ExecutionContext
    Annotations
    @deprecated
    Deprecated

    (Since version 2.12.0) preparation of ExecutionContexts will be removed

Inherited from Dispatcher

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 BalancingDispatcher to any2stringadd[BalancingDispatcher]

Inherited by implicit conversion StringFormat from BalancingDispatcher to StringFormat[BalancingDispatcher]

Inherited by implicit conversion Ensuring from BalancingDispatcher to Ensuring[BalancingDispatcher]

Inherited by implicit conversion ArrowAssoc from BalancingDispatcher to ArrowAssoc[BalancingDispatcher]

Ungrouped