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

org.vertexium.metric.VertexiumMetricRegistry Maven / Gradle / Ivy

There is a newer version: 4.10.0
Show newest version
package org.vertexium.metric;

import java.util.function.Supplier;

public interface VertexiumMetricRegistry {
    String createName(Class clazz, String... nameParts);

    default Counter getCounter(Class clazz, String... nameParts) {
        return getCounter(createName(clazz, nameParts));
    }

    Counter getCounter(String name);

    Iterable getCounters();

    default Timer getTimer(Class clazz, String... nameParts) {
        return getTimer(createName(clazz, nameParts));
    }

    Timer getTimer(String name);

    Iterable getTimers();

    default Histogram getHistogram(Class clazz, String... nameParts) {
        return getHistogram(createName(clazz, nameParts));
    }

    Histogram getHistogram(String name);

    Iterable getHistograms();

    default  Gauge getGauge(Class clazz, String namePart1, Supplier supplier) {
        return getGauge(createName(clazz, namePart1), supplier);
    }

    default  Gauge getGauge(Class clazz, String namePart1, String namePart2, Supplier supplier) {
        return getGauge(createName(clazz, namePart1, namePart2), supplier);
    }

     Gauge getGauge(String name, Supplier supplier);

    Iterable getGauges();

    default StackTraceTracker getStackTraceTracker(Class clazz, String... nameParts) {
        return getStackTraceTracker(createName(clazz, nameParts));
    }

    StackTraceTracker getStackTraceTracker(String name);

    Iterable getStackTraceTrackers();

    void shutdown();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy