* Helper method to initialize concurrencyPoolSize from {@link com.flipkart.phantom.task.impl.TaskHandler#getInitializationCommands()} ()}
* and {@link com.flipkart.phantom.task.impl.HystrixTaskHandler#getConcurrentPoolSizeParams()} ()}
*/
private void initializeConcurrencyPoolMap(TaskHandler taskHandler) {
if (taskHandler instanceof HystrixTaskHandler) {
HystrixTaskHandler hystrixTaskHandler = (HystrixTaskHandler) taskHandler;
// Thread pool size
Map<String, Integer> threadParams = hystrixTaskHandler.getConcurrentPoolSizeParams();
for (String threadParam : threadParams.keySet()) {
this.concurrencyPoolSize.put(threadParam, threadParams.get(threadParam));
}
// Commands thread pool size
Map<String, Integer> commandParams = hystrixTaskHandler.getCommandPoolSizeParams();
for (String commandParam : commandParams.keySet()) {
this.concurrencyPoolSize.put(commandParam, commandParams.get(commandParam));
}
}
}