All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yammer.metrics.annotation.Gauge Maven / Gradle / Ivy

There is a newer version: 3.0.0-BETA1
Show newest version
package com.yammer.metrics.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * An annotation for marking a method of a Guice-provided 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 {@code queueSize} will be created which uses the * annotated method's return value as its value. */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD, ElementType.FIELD}) public @interface Gauge { /** * The gauge's group. */ String group() default ""; /** * The gauge's type. */ String type() default ""; /** * The gauge's name. */ String name() default ""; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy