Akka Actor Mailbox_Mailbox Implementations

Akka Actor Mailbox_Mailbox Implementations

  • Unbounded:无界队列,

  • Bounded:有界队列,

Builtin Mailbox Implementations

Akka comes shipped with a number of mailbox implementations:

UnboundedMailbox - The default mailbox

– Backed by a java.util.concurrent.ConcurrentLinkedQueue

– Blocking: No

– Bounded: No

– Configuration name: “unbounded” or “akka.dispatch.UnboundedMailbox”


SingleConsumerOnlyUnboundedMailbox

– Backed by a very efficient Multiple Producer Single Consumer queue, cannot be used with BalancingDispatcher

– Blocking: No

– Bounded: No

– Configuration name: “akka.dispatch.SingleConsumerOnlyUnboundedMailbox”


BoundedMailbox

– Backed by a java.util.concurrent.LinkedBlockingQueue

– Blocking: Yes

– Bounded: Yes

– Configuration name: “bounded” or “akka.dispatch.BoundedMailbox”


UnboundedPriorityMailbox

– Backed by a java.util.concurrent.PriorityBlockingQueue

– Blocking: Yes

– Bounded: No

– Configuration name: “akka.dispatch.UnboundedPriorityMailbox”


BoundedPriorityMailbox

– Backed by a java.util.PriorityBlockingQueue wrapped in an akka.util.BoundedBlockingQueue

– Blocking: Yes

– Bounded: Yes

– Configuration name: “akka.dispatch.BoundedPriorityMailbox”


你可能感兴趣的:(Akka Actor Mailbox_Mailbox Implementations)