Modifier and Type | Method and Description |
---|---|
long |
count()
Returns the number of events which have been marked.
|
String |
eventType()
Returns the type of events the meter is measuring.
|
double |
fifteenMinuteRate()
Returns the fifteen-minute exponentially-weighted moving average rate at which events have
occurred since the meter was created.
|
double |
fiveMinuteRate()
Returns the five-minute exponentially-weighted moving average rate at which events have
occurred since the meter was created.
|
void |
mark()
Mark the occurrence of an event.
|
void |
mark(long n)
Mark the occurrence of a given number of events.
|
double |
meanRate()
Returns the mean rate at which events have occurred since the meter was created.
|
double |
oneMinuteRate()
Returns the one-minute exponentially-weighted moving average rate at which events have
occurred since the meter was created.
|
<T> void |
processWith(MetricProcessor<T> processor,
MetricName name,
T context)
Allow the given
MetricProcessor to process this as a metric. |
TimeUnit |
rateUnit()
Returns the meter's rate unit.
|
void |
stop()
Stop the instance.
|
public TimeUnit rateUnit()
Metered
public String eventType()
Metered
public void mark()
public void mark(long n)
n
- the number of eventspublic long count()
Metered
public double fifteenMinuteRate()
Metered
top
Unix command.fifteenMinuteRate
in interface Metered
public double fiveMinuteRate()
Metered
top
Unix command.fiveMinuteRate
in interface Metered
public double meanRate()
Metered
public double oneMinuteRate()
Metered
top
Unix command.oneMinuteRate
in interface Metered
public void stop()
Stoppable
public <T> void processWith(MetricProcessor<T> processor, MetricName name, T context) throws Exception
Metric
MetricProcessor
to process this
as a metric.processWith
in interface Metric
T
- the type of the context objectprocessor
- a MetricProcessor
name
- the name of the current metriccontext
- a given context which should be passed on to processor
Exception
- if something goes wrongCopyright © 2014. All Rights Reserved.