}
@Override
public ManagedExecutorService register(String name, int defaultPoolSize, int defaultQueueCapacity,
ExecutorType type) {
ExecutorConfig cfg = nodeEngine.getConfig().getExecutorConfigs().get(name);
int poolSize = defaultPoolSize;
int queueCapacity = defaultQueueCapacity;
if (cfg != null) {
poolSize = cfg.getPoolSize();
if (cfg.getQueueCapacity() <= 0) {
queueCapacity = Integer.MAX_VALUE;
} else {
queueCapacity = cfg.getQueueCapacity();
}
}
ManagedExecutorService executor = createExecutor(name, poolSize, queueCapacity, type);
if (executors.putIfAbsent(name, executor) != null) {