private final HystrixThreadPoolMetrics metrics;
private final Scheduler scheduler;
public HystrixThreadPoolDefault(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolProperties.Setter propertiesDefaults) {
this.properties = HystrixPropertiesFactory.getThreadPoolProperties(threadPoolKey, propertiesDefaults);
HystrixConcurrencyStrategy concurrencyStrategy = HystrixPlugins.getInstance().getConcurrencyStrategy();
this.queue = concurrencyStrategy.getBlockingQueue(properties.maxQueueSize().get());
this.threadPool = concurrencyStrategy.getThreadPool(threadPoolKey, properties.coreSize(), properties.coreSize(), properties.keepAliveTimeMinutes(), TimeUnit.MINUTES, queue);
this.metrics = HystrixThreadPoolMetrics.getInstance(threadPoolKey, threadPool, properties);
this.scheduler = new HystrixContextScheduler(concurrencyStrategy, this);
/* strategy: HystrixMetricsPublisherThreadPool */
HystrixMetricsPublisherFactory.createOrRetrievePublisherForThreadPool(threadPoolKey, this.metrics, this.properties);