class IoTDBThreadPoolFactory {

  public static ExecutorService createThriftRpcClientThreadPool(TThreadPoolServer.Args args, String poolName) {
    SynchronousQueue<Runnable> executorQueue = new SynchronousQueue<>();
    return new ThreadPoolExecutor(args.minWorkerThreads, args.maxWorkerThreads, args.stopTimeoutVal,
        args.stopTimeoutUnit, executorQueue, new IoTThreadFactory(poolName));
  }

  private  IoTDBThreadPoolFactory();

}