Package com.codahale.metrics.annotation
Annotation Type Gauge
-
@Retention(RUNTIME) @Target({METHOD,FIELD,ANNOTATION_TYPE}) public @interface Gauge
An annotation for marking a method of an annotated object as a gauge.Given a method like this:
@Gauge(name = "queueSize") public int getQueueSize() { return queue.size; }
A gauge for the defining class with the name
queueSize
will be created which uses the annotated method's return value as its value.
-
-
Element Detail
-
name
String name
- Returns:
- The gauge's name.
- Default:
- ""
-
-