public class InMemoryMetricsFactory extends java.lang.Object implements MetricsFactory
| Constructor and Description |
|---|
InMemoryMetricsFactory() |
| Modifier and Type | Method and Description |
|---|---|
Counter |
createCounter(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> tags)
Creates a counter with the given gauge name and set of tags.
|
Gauge |
createGauge(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> tags)
Creates a gauge with the given gauge name and set of tags.
|
Timer |
createTimer(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> tags)
Creates a timer with the given timer name and set of tags.
|
long |
getCounter(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> tags)
Returns the counter value information for the counter with the given metric name.
|
long |
getCounter(java.lang.String name,
java.lang.String tags)
Returns the counter value information for the counter with the given metric name.
|
long |
getGauge(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> tags)
Returns the current value for the gauge with the given metric name.
|
long |
getGauge(java.lang.String name,
java.lang.String tags)
Returns the current value for the gauge with the given metric name.
|
long |
getTimer(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> tags)
Returns the current accumulated timing information for the timer with the given metric name.
|
long |
getTimer(java.lang.String name,
java.lang.String tags)
Returns the current accumulated timing information for the timer with the given metric name.
|
public Counter createCounter(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> tags)
MetricsFactorycreateCounter in interface MetricsFactoryname - the counter nametags - the tags to add to the counterCounter with a metric name following the counter name and tagsMetrics.addTagsToMetricName(String, Map)public Timer createTimer(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> tags)
MetricsFactorycreateTimer in interface MetricsFactoryname - the timer nametags - the tags to add to the timerTimer with a metric name following the counter name and tagsMetrics.addTagsToMetricName(String, Map)public Gauge createGauge(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> tags)
MetricsFactorycreateGauge in interface MetricsFactoryname - the gauge nametags - the tags to add to the gaugeGauge with a metric name following the gauge name and tagsMetrics.addTagsToMetricName(String, Map)public long getCounter(java.lang.String name,
java.lang.String tags)
name - the metric name, which includes the tagstags - the metric tags as comma separated list of entries, like "foo=bar,baz=qux"public long getCounter(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> tags)
name - the metric name, which includes the tagstags - the metric tagspublic long getGauge(java.lang.String name,
java.lang.String tags)
name - the metric name, which includes the tagstags - the metric tags as comma separated list of entries, like "foo=bar,baz=qux"public long getGauge(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> tags)
name - the metric name, which includes the tagstags - the metric tagspublic long getTimer(java.lang.String name,
java.lang.String tags)
name - the metric name, which includes the tagstags - the metric tags as comma separated list of entries, like "foo=bar,baz=qux"public long getTimer(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> tags)
name - the metric name, which includes the tagstags - the metric tags