That is correct.
You can also make use of the xml configuration. You can find examples here: https://github.com/hazelcast/hazelcast-book-examples
Frage
I am trying to play with the distributed executor service in hazelcast.
HazelcastInstance hz = Hazelcast.newHazelcastInstance(cfg);
IExecutorService es = hz.getExecutorService("default1");
I know that ExecutorService.newFixedThreadPool(8)
is the way to set the number of threads for normal executor service, but not sure about the Distributed ExecutorService
ExecutorConfig ecfg = new ExecutorConfig();
ecfg.setPoolSize(5);
config.addExecutorConfig(ecfg);
Is this correct?
Lösung
That is correct.
You can also make use of the xml configuration. You can find examples here: https://github.com/hazelcast/hazelcast-book-examples