public class DeltaCounter
extends com.yammer.metrics.core.Counter
WavefrontHistogram is implemented)| Modifier and Type | Method and Description |
|---|---|
static DeltaCounter |
get(com.yammer.metrics.core.MetricName metricName)
A static factory method to create an instance of DeltaCounter.
|
static DeltaCounter |
get(com.yammer.metrics.core.MetricsRegistry registry,
com.yammer.metrics.core.MetricName metricName)
A static factory method to create an instance of Delta Counter.
|
static com.yammer.metrics.core.MetricName |
getDeltaCounterMetricName(com.yammer.metrics.core.MetricName metricName)
This method transforms the MetricName into a new MetricName that represents a DeltaCounter.
|
static String |
getDeltaCounterName(String name)
A helper function to transform a counter name to a DeltaCounter name.
|
static String |
getNameWithoutDeltaPrefix(String name)
A helper function to transform the name from a DeltaCounter name to a new name by removing
the "∆" prefix.
|
static boolean |
isDelta(String name)
This method checks whether the name is a valid DeltaCounter name.
|
static long |
processDeltaCounter(DeltaCounter counter)
This method returns the current count of the DeltaCounter and resets the counter.
|
public static DeltaCounter get(com.yammer.metrics.core.MetricsRegistry registry, com.yammer.metrics.core.MetricName metricName)
registry - The MetricRegistry to usemetricName - The MetricName to usepublic static DeltaCounter get(com.yammer.metrics.core.MetricName metricName)
metricName - The MetricName to usepublic static long processDeltaCounter(DeltaCounter counter)
counter - The DeltaCounter whose value is requestedpublic static com.yammer.metrics.core.MetricName getDeltaCounterMetricName(com.yammer.metrics.core.MetricName metricName)
metricName - The MetricName which needs to be transformedpublic static String getDeltaCounterName(String name)
name - The name which needs to be transformedpublic static boolean isDelta(String name)
name - The name which needs to be checkedpublic static String getNameWithoutDeltaPrefix(String name)
name - The name which needs to be transformedCopyright © 2018. All rights reserved.