Java Thread Executor getActiveHelperInstanceCount(String helperName)

Here you can find the source of getActiveHelperInstanceCount(String helperName)

Description

get Active Helper Instance Count

License

GNU General Public License

Declaration

public static int getActiveHelperInstanceCount(String helperName) 

Method Source Code

//package com.java2s;
/**// www. j  ava 2s  .co m
 * Helper???????????????????????????.<br>
 *
 * @author T.Okuyama
 * @license GPL(Lv3)
 */

import java.util.concurrent.ThreadPoolExecutor;

import java.util.concurrent.ConcurrentHashMap;

public class Main {
    private static ConcurrentHashMap executorServiceMap = new ConcurrentHashMap(
            1024, 1000, 512);

    public static int getActiveHelperInstanceCount(String helperName) {
        return ((ThreadPoolExecutor) executorServiceMap.get(helperName))
                .getActiveCount();
    }
}

Related

  1. addExecutorShutdownHook(final ExecutorService exec)
  2. addThread(Runnable runnable)
  3. convert(Runnable runnable, T result)
  4. getChannelService()
  5. getConstantLookup()
  6. getThreadExecutor(int nThreads)
  7. isCorrectCollectionSizeTimeOut(Collection collection, int size, long timeout, TimeUnit unit)