JGroups是一个可靠的群组通讯Java工具包。
JGroups 3.x 有 4 个线程池:
Regular thread pool: used for regular messages (default has a queue)
OOB thread pool: used for OOB messages (no queue)
Internal thread pool: used for JGroups internal messages only. The main raison d'etre for this pool was that internal messages such as heartbeats or credits should never get queued up behind other messages, and get processed immediately.
Timer thread pool: all tasks in a timer need to be executed by a thread pool as they can potentially block
但是 JGroups 4.0 将只有一个线程池处理规则,这个新的线程池没有队列,否则它添加任务时不会出现RejectedExecutionException,但简单的队列,并不是我们想要的内部消息或定时器任务。
4.0 配置举例如下:
thread_pool.enabled="true"
thread_pool.min_threads="2"
thread_pool.max_threads="8"
thread_pool.keep_alive_time="5000"
引用来自“思静谦”的评论
@红薯欧巴,你们现在越来越偷懒了引用来自“红薯”的评论
卧槽,那么大的版本更新,好好去找找更新内容引用来自“红薯”的评论
卧槽,那么大的版本更新,好好去找找更新内容引用来自“红薯”的评论
卧槽,那么大的版本更新,好好去找找更新内容