code: public static InstrumentedScheduledExecutorService newScheduledThreadPool(
              int corePoolSize, ThreadFactory threadFactory, MetricRegistry registry, String name) {
          return new InstrumentedScheduledExecutorService(
                  Executors.newScheduledThreadPool(corePoolSize, threadFactory), registry, name);
      }
docs: Creates an instrumented thread pool that can schedule commands to run after a
  given delay, or to execute periodically.
  
  @param corePoolSize  the number of threads to keep in the pool,
  even if they are idle
  @param threadFactory the factory to use when the executor
  creates a new thread
  @param registry      the {@link MetricRegistry} that will contain the metrics.
  @param name          the (metrics) name for this executor service, see {@link MetricRegistry#name(String, String...)}.
  @return a newly created scheduled thread pool
  @throws IllegalArgumentException if {@code corePoolSize < 0}
  @throws NullPointerException     if threadFactory is null
  @see Executors#newScheduledThreadPool(int, ThreadFactory)