| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Resets the counter to 0.
|
long |
count()
Returns the counter's current value.
|
void |
dec()
Decrement the counter by one.
|
void |
dec(long n)
Decrement the counter by
n. |
void |
inc()
Increment the counter by one.
|
void |
inc(long n)
Increment the counter by
n. |
<T> void |
processWith(MetricProcessor<T> processor,
MetricName name,
T context)
Allow the given
MetricProcessor to process this as a metric. |
public void inc()
public void inc(long n)
n.n - the amount by which the counter will be increasedpublic void dec()
public void dec(long n)
n.n - the amount by which the counter will be increasedpublic long count()
public void clear()
public <T> void processWith(MetricProcessor<T> processor, MetricName name, T context) throws Exception
MetricMetricProcessor to process this as a metric.processWith in interface MetricT - the type of the context objectprocessor - a MetricProcessorname - the name of the current metriccontext - a given context which should be passed on to processorException - if something goes wrongCopyright © 2012. All Rights Reserved.