在运行时检查Akka dispatcher
我正在使用Akka dispatcher/executor配置,我想向自己证明我所做的配置更改已经生效。因此,我想在运行时检查调度程序的执行器参数(即并行度最小值、并行度因子、并行度最大值) 我试过这个:在运行时检查Akka dispatcher,akka,dispatcher,Akka,Dispatcher,我正在使用Akka dispatcher/executor配置,我想向自己证明我所做的配置更改已经生效。因此,我想在运行时检查调度程序的执行器参数(即并行度最小值、并行度因子、并行度最大值) 我试过这个: println(actorSystem.dispatcher.toString) 但是,它打印出来的只是: Dispatcher[akka.actor.default Dispatcher],没有任何其他特定参数的详细信息 是否可以打印出我的dispatcher的运行时配置?您可以使用: a
println(actorSystem.dispatcher.toString)
但是,它打印出来的只是:
Dispatcher[akka.actor.default Dispatcher]
,没有任何其他特定参数的详细信息
是否可以打印出我的dispatcher的运行时配置?您可以使用:
actorSystem
.dispatchers
.lookup("akka.actor.default-dispatcher")
.configurator
.config
.getInt("fork-join-executor.parallelism-max")
actorSystem
.dispatchers
.lookup("akka.actor.default-dispatcher")
.configurator
.config
.getInt("fork-join-executor.parallelism-min")
actorSystem
.dispatchers
.lookup("akka.actor.default-dispatcher")
.configurator
.config
.getDouble("fork-join-executor.parallelism-factor")