![JAR search and dependency download from the Maven repository](/logo.png)
org.avaje.metric.GaugeLongMetric Maven / Gradle / Ivy
The newest version!
package org.avaje.metric;
/**
* Metric based on an underlying gauge that reports long values.
*
* A GaugeLongMetric is created by {@link MetricManager#register(MetricName, GaugeLong)}.
*
*
* Example:
*
*
*
* class ThreadCountGauge implements GaugeLong {
*
* public long getValue() {
* return threadMXBean.getThreadCount();
* }
* }
*
*
* GaugeLongMetric gauge = MetricManager.register("jvm.thread.count", threadCountGauge);
*
*
*
*
* Note that avaje-metric-core registers some core JVM gauges that include
* threads, memory and garbage collection.
*/
public interface GaugeLongMetric extends Metric {
/**
* Return the value.
*/
long getValue();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy