コード例 #1
0
 private ScheduledExecutorService newMeterTickThreadPool() {
   return threadPools.newScheduledThreadPool(2, "meter-tick");
 }
コード例 #2
0
 /**
  * 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);
 }
コード例 #3
0
ファイル: Utils.java プロジェクト: rkrol/metrics
 /**
  * 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();
 }
コード例 #4
0
 /** Shut down this registry's thread pools. */
 public void shutdown() {
   threadPools.shutdown();
 }
コード例 #5
0
ファイル: Utils.java プロジェクト: rkrol/metrics
 /**
  * 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);
 }