org.vertexium.metric.VertexiumMetricRegistry Maven / Gradle / Ivy
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 extends Counter> getCounters();
default Timer getTimer(Class clazz, String... nameParts) {
return getTimer(createName(clazz, nameParts));
}
Timer getTimer(String name);
Iterable extends Timer> getTimers();
default Histogram getHistogram(Class clazz, String... nameParts) {
return getHistogram(createName(clazz, nameParts));
}
Histogram getHistogram(String name);
Iterable extends Histogram> 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 extends Gauge> getGauges();
default StackTraceTracker getStackTraceTracker(Class clazz, String... nameParts) {
return getStackTraceTracker(createName(clazz, nameParts));
}
StackTraceTracker getStackTraceTracker(String name);
Iterable extends StackTraceTracker> getStackTraceTrackers();
void shutdown();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy