|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.metrics.codahale_metrics.metrics.core.Gauge<T>
T
- the type of the metric's valuepublic abstract class Gauge<T>
A gauge metric is an instantaneous reading of a particular value. To instrument a queue's depth,
for example:
final Queue<String> queue = new ConcurrentLinkedQueue<String>();
final Gauge<Integer> queueDepth = new Gauge<Integer>() {
public Integer value() {
return queue.size();
}
};
Constructor Summary | |
---|---|
Gauge()
|
Method Summary | ||
---|---|---|
|
processWith(MetricProcessor<U> processor,
MetricName name,
U context)
Allow the given MetricProcessor to process this as a metric. |
|
abstract T |
value()
Returns the metric's current value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Gauge()
Method Detail |
---|
public abstract T value()
public <U> void processWith(MetricProcessor<U> processor, MetricName name, U context) throws java.lang.Exception
Metric
MetricProcessor
to process this
as a metric.
processWith
in interface Metric
U
- 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
java.lang.Exception
- if something goes wrong
|
© 2006-2016 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |