com.yammer.metrics.util
Class Utils

java.lang.Object
  extended by com.yammer.metrics.util.Utils

public class Utils
extends Object


Method Summary
static Map<MetricName,Metric> filterMetrics(Map<MetricName,Metric> metrics, MetricPredicate predicate)
           
static ScheduledExecutorService newScheduledThreadPool(int poolSize, String name)
          Deprecated. Get a thread pool via MetricsRegistry.threadPools() instead
static void shutdownThreadPools()
          Deprecated. Shut down the thread pools object of the relevant MetricsRegistry instead
static Map<String,Map<MetricName,Metric>> sortAndFilterMetrics(Map<MetricName,Metric> metrics, MetricPredicate predicate)
           
static Map<String,Map<MetricName,Metric>> sortMetrics(Map<MetricName,Metric> metrics)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

sortMetrics

public static Map<String,Map<MetricName,Metric>> sortMetrics(Map<MetricName,Metric> metrics)

filterMetrics

public static Map<MetricName,Metric> filterMetrics(Map<MetricName,Metric> metrics,
                                                   MetricPredicate predicate)

sortAndFilterMetrics

public static Map<String,Map<MetricName,Metric>> sortAndFilterMetrics(Map<MetricName,Metric> metrics,
                                                                      MetricPredicate predicate)

newScheduledThreadPool

public static ScheduledExecutorService newScheduledThreadPool(int poolSize,
                                                              String name)
Deprecated. Get a thread pool via MetricsRegistry.threadPools() instead

Creates a new scheduled thread pool of a given size with the given name.

Parameters:
poolSize - the number of threads to create
name - the name of the pool
Returns:
a new ScheduledExecutorService

shutdownThreadPools

public static void shutdownThreadPools()
Deprecated. Shut down the thread pools object of the relevant MetricsRegistry instead

Shuts down all thread pools created by this class in an orderly fashion.



Copyright © 2011. All Rights Reserved.