akka.dispatch

ExecutorBasedEventDrivenWorkStealingDispatcher

class ExecutorBasedEventDrivenWorkStealingDispatcher extends ExecutorBasedEventDrivenDispatcher

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 use the akka.dispatch.Dispatchers factory object.

See also

akka.dispatch.Dispatchers

,

akka.dispatch.ExecutorBasedEventDrivenWorkStealingDispatcher

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. ExecutorBasedEventDrivenWorkStealingDispatcher
  2. ExecutorBasedEventDrivenDispatcher
  3. MessageDispatcher
  4. AnyRef
  5. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ExecutorBasedEventDrivenWorkStealingDispatcher (_name: String, mailboxType: MailboxType)

  2. new ExecutorBasedEventDrivenWorkStealingDispatcher (_name: String, memberType: Class[_ <: akka.actor.Actor])

  3. new ExecutorBasedEventDrivenWorkStealingDispatcher (_name: String, _config: ThreadPoolConfig)

  4. new ExecutorBasedEventDrivenWorkStealingDispatcher (_name: String, throughput: Int)

  5. new ExecutorBasedEventDrivenWorkStealingDispatcher (_name: String, throughput: Int, mailboxType: MailboxType)

  6. new ExecutorBasedEventDrivenWorkStealingDispatcher (_name: String, throughput: Int, throughputDeadlineTime: Int, mailboxType: MailboxType)

  7. new ExecutorBasedEventDrivenWorkStealingDispatcher (_name: String, throughput: Int, throughputDeadlineTime: Int, mailboxType: MailboxType, config: ThreadPoolConfig)

Value Members

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

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

    Attributes
    final
    Definition Classes
    Any
  6. val active : Switch

    Attributes
    protected
    Definition Classes
    MessageDispatcher
  7. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  8. def attach (actorRef: ActorRef): Unit

    Attaches the specified actorRef to this dispatcher

    Attaches the specified actorRef to this dispatcher

    Attributes
    final
    Definition Classes
    MessageDispatcher
  9. def attemptDonationOf (message: MessageInvocation, donorMbox: MessageQueue with ExecutableMailbox): Boolean

    Returns true if the donation succeeded or false otherwise

    Returns true if the donation succeeded or false otherwise

    Attributes
    protected
  10. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def createMailbox (actorRef: ActorRef): AnyRef

    Creates and returns a mailbox for the given actor.

    Creates and returns a mailbox for the given actor.

    Definition Classes
    ExecutorBasedEventDrivenDispatcherMessageDispatcher
  12. def detach (actorRef: ActorRef): Unit

    Detaches the specified actorRef from this dispatcher

    Detaches the specified actorRef from this dispatcher

    Attributes
    final
    Definition Classes
    MessageDispatcher
  13. def doFindDonorRecipient (donorMbox: MessageQueue with ExecutableMailbox, potentialRecipients: Vector[ActorRef], startIndex: Int): ActorRef

    Returns an available recipient for the message, if any

    Returns an available recipient for the message, if any

    Attributes
    protected
  14. def donate (organ: MessageInvocation, recipient: ActorRef): Boolean

    Rewrites the message and adds that message to the recipients mailbox returns true if the message is non-null

    Rewrites the message and adds that message to the recipients mailbox returns true if the message is non-null

    Attributes
    protected
  15. def donateFrom (donorMbox: MessageQueue with ExecutableMailbox): Boolean

    Returns true if it successfully donated a message

    Returns true if it successfully donated a message

    Attributes
    protected
  16. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  17. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  18. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  19. val futures : AtomicLong

    Attributes
    protected
    Definition Classes
    MessageDispatcher
  20. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef
  21. def getMailbox (receiver: ActorRef): MessageQueue with ExecutableMailbox

    returns

    the mailbox associated with the actor

    Attributes
    protected
    Definition Classes
    ExecutorBasedEventDrivenDispatcher
  22. val guard : ReentrantGuard

    Attributes
    protected
    Definition Classes
    MessageDispatcher
  23. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  24. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  25. def mailboxSize (actorRef: ActorRef): Int

    Returns the size of the mailbox for the specified actor

    Returns the size of the mailbox for the specified actor

    Definition Classes
    ExecutorBasedEventDrivenDispatcherMessageDispatcher
  26. val name : String

  27. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  28. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  29. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  30. def pendingFutures : Long

    Returns the amount of futures queued for execution

    Returns the amount of futures queued for execution

    Definition Classes
    MessageDispatcher
  31. def resume (actorRef: ActorRef): Unit

  32. def stopAllAttachedActors : Unit

    Traverses the list of actors (uuids) currently being attached to this dispatcher and stops those actors

    Traverses the list of actors (uuids) currently being attached to this dispatcher and stops those actors

    Definition Classes
    MessageDispatcher
  33. def suspend (actorRef: ActorRef): 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

    Definition Classes
    ExecutorBasedEventDrivenDispatcherMessageDispatcher
  34. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  35. val toString : String

    Definition Classes
    ExecutorBasedEventDrivenDispatcher → AnyRef → Any
  36. val uuids : ConcurrentSkipListSet[Uuid]

    Attributes
    protected
    Definition Classes
    MessageDispatcher
  37. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from ExecutorBasedEventDrivenDispatcher

Inherited from MessageDispatcher

Inherited from AnyRef

Inherited from Any