private ScheduledExecutorService newMeterTickThreadPool() { return threadPools.newScheduledThreadPool(2, "meter-tick"); }
/** * 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); }
/** * Shuts down all thread pools created by this class in an orderly fashion. * * @deprecated Shut down the thread pools object of the relevant {@link * com.yammer.metrics.core.MetricsRegistry} instead */ public static void shutdownThreadPools() { THREAD_POOLS.shutdownThreadPools(); }
/** Shut down this registry's thread pools. */ public void shutdown() { threadPools.shutdown(); }
/** * 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); }