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

io.github.quickmsg.common.metric.TotalCounter Maven / Gradle / Ivy

The newest version!
package io.github.quickmsg.common.metric;

/**
 * @author luxurong
 */
public class TotalCounter extends WholeCounter {

    private final CounterType counterType;

    public TotalCounter(MetricBean metricBean, CounterType counterType) {
        super(metricBean);
        this.counterType = counterType;
        initCount();
    }


    @Override
    public void callMeter(long counter) {
        getMetricBean().getMeterRegistry().gauge(getCounterType().getDesc(), counter);
    }

    @Override
    public CounterType getCounterType() {
        return this.counterType;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy