public PoolBuilder poolName(final String poolName) {
            this.poolName = poolName;
            return this;
        }
Creates a new ScheduledThreadPoolExecutor with the given
initial parameters.

@param poolName        the name of the thread pool
@param enableMetric    if metric is enabled
@param coreThreads     the number of threads to keep in the pool, even if they are
                       idle, unless {@code allowCoreThreadTimeOut} is set.
@param threadFactory   the factory to use when the executor
                       creates a new thread
@param rejectedHandler the handler to use when execution is blocked because the
                       thread bounds and queue capacities are reached

@throws IllegalArgumentException if {@code corePoolSize < 0}
@throws NullPointerException if {@code threadFactory} or
        {@code handler} is null
@return a new ScheduledThreadPoolExecutor
jraft-core/src/main/java/com/alipay/sofa/jraft/util/ThreadPoolUtil.java