/**
  * Creates a new scheduled thread pool of a given size with the given name, or returns an existing
  * thread pool if one was already created with the same name.
  *
  * @param poolSize the number of threads to create
  * @param name the name of the pool
  * @return a new {@link ScheduledExecutorService}
  */
 public ScheduledExecutorService newScheduledThreadPool(int poolSize, String name) {
   return threadPools.newScheduledThreadPool(poolSize, name);
 }
 private ScheduledExecutorService newMeterTickThreadPool() {
   return threadPools.newScheduledThreadPool(2, "meter-tick");
 }
Exemplo n.º 3
0
 /**
  * Creates a new scheduled thread pool of a given size with the given name.
  *
  * @param poolSize the number of threads to create
  * @param name the name of the pool
  * @return a new {@link ScheduledExecutorService}
  * @deprecated Get a thread pool via {@link com.yammer.metrics.core.MetricsRegistry#threadPools()}
  *     instead
  */
 public static ScheduledExecutorService newScheduledThreadPool(int poolSize, String name) {
   return THREAD_POOLS.newScheduledThreadPool(poolSize, name);
 }