How to specify number of threads for distributed executor service Hazelcast

StackOverflow https://stackoverflow.com/questions/20662786

  •  19-09-2022
  •  | 
  •  

Pergunta

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?

Foi útil?

Solução

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top