List of usage examples for java.util.concurrent ThreadPoolExecutor isTerminating
public boolean isTerminating()
From source file:org.apache.hadoop.hbase.index.parallel.ThreadPoolManager.java
static synchronized ThreadPoolExecutor getExecutor(ThreadPoolBuilder builder, Map<String, Object> poolCache) { ThreadPoolExecutor pool = (ThreadPoolExecutor) poolCache.get(builder.getName()); if (pool == null || pool.isTerminating() || pool.isShutdown()) { pool = getDefaultExecutor(builder); LOG.info("Creating new pool for " + builder.getName()); poolCache.put(builder.getName(), pool); }// w w w . j a v a 2 s.com ((ShutdownOnUnusedThreadPoolExecutor) pool).addReference(); return pool; }