@SuppressWarnings("deprecation") protected ThreadPoolConfig updateFrom(ExtendedThreadPool ep) { this.queue = ep.getQueue(); this.threadFactory = ep.getThreadFactory(); this.poolName = ep.getName(); this.maxPoolSize = ep.getMaximumPoolSize(); //hiding internal values, due to they might not match configure //this.queueLimit = ep.getMaxQueuedTasksCount(); //this.corepoolsize = ep.getCorePoolSize(); //this.keepAliveTime = keepAliveTime; //this.timeUnit = timeUnit; //this.monitoringProbe = monitoringProbe; return this; }
maxPoolSize = ((ExtendedThreadPool) threadPool).getMaximumPoolSize();
float threadRatio = (float) st.getActiveCount() / (float) st.getMaximumPoolSize();