Akka Types of dispatchers
2019獨角獸企業重金招聘Python工程師標準>>>
Akka Types of dispatchers
There are 4 different types of message dispatchers:
? Dispatcher
– This is an event-based dispatcher that binds a set of Actors to a thread pool. It is the default dispatcher?used if one is not specified.
– Sharability: Unlimited
– Mailboxes: Any, creates one per Actor
– Use cases: Default dispatcher, Bulkheading
– Driven by: java.util.concurrent.ExecutorService specify using “executor” using “fork-join-executor”, “thread-pool-executor” or the FQCN of an
akka.dispatcher.ExecutorServiceConfigurator
? PinnedDispatcher
– This dispatcher dedicates a unique thread for each actor using it; i.e. each actor will have its own?thread pool with only one thread in the pool.
– Sharability: None
– Mailboxes: Any, creates one per Actor
– Use cases: Bulkheading
– Driven by: Any akka.dispatch.ThreadPoolExecutorConfigurator by default a“thread-pool-executor”
? CallingThreadDispatcher
– This dispatcher 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. See CallingThreadDispatcher for details and restrictions.
– Sharability: Unlimited
– Mailboxes: Any, creates one per Actor per Thread (on demand)
– Use cases: Testing
– Driven by: The calling thread (duh)
Akka官方文檔中說有四個,只找到三個。
================END================
轉載于:https://my.oschina.net/xinxingegeya/blog/367320
總結
以上是生活随笔為你收集整理的Akka Types of dispatchers的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CSS学习笔记(十四) 我们前端是怎么跟
- 下一篇: 线性表的本质