001package org.avaje.metric; 002 003/** 004 * Metric based on an underlying gauge that reports long values. 005 * <p> 006 * A GaugeLongMetric is created by {@link MetricManager#register(MetricName, GaugeLong)}. 007 * 008 * <p> 009 * Example: 010 * 011 * <pre> 012 * <code> 013 * class ThreadCountGauge implements GaugeLong { 014 * 015 * public long getValue() { 016 * return threadMXBean.getThreadCount(); 017 * } 018 * } 019 * 020 * 021 * GaugeLongMetric gauge = MetricManager.register("jvm.thread.count", threadCountGauge); 022 * 023 * </code> 024 * </pre> 025 * <p> 026 * Note that <em>metric-core</em> registers some core JVM gauges that include 027 * threads, memory and garbage collection. 028 */ 029public interface GaugeLongMetric extends Metric { 030 031 /** 032 * Return the value. 033 */ 034 long getValue(); 035 036}