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

pl.allegro.tech.hermes.common.metric.PersistentBufferMetrics Maven / Gradle / Ivy

The newest version!
package pl.allegro.tech.hermes.common.metric;

import io.micrometer.core.instrument.MeterRegistry;

import java.util.function.ToDoubleFunction;

import static pl.allegro.tech.hermes.common.metric.Gauges.BACKUP_STORAGE_SIZE;

public class PersistentBufferMetrics {
    private final MeterRegistry meterRegistry;

    public PersistentBufferMetrics(MeterRegistry meterRegistry) {
        this.meterRegistry = meterRegistry;
    }

    public  void registerBackupStorageSizeGauge(T obj, ToDoubleFunction f) {
        meterRegistry.gauge(BACKUP_STORAGE_SIZE, obj, f);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy