com.codahale.metrics.DerivativeGauge Maven / Gradle / Ivy
package com.codahale.metrics;
@Deprecated
public abstract class DerivativeGauge implements Gauge {
private final io.dropwizard.metrics5.DerivativeGauge delegate;
protected DerivativeGauge(Gauge base) {
DerivativeGauge original = this;
delegate = new io.dropwizard.metrics5.DerivativeGauge(base.getDelegate()) {
@Override
protected T transform(F value) {
return original.transform(base.getValue());
}
};
}
protected abstract T transform(F value);
@Override
public T getValue() {
return delegate.getValue();
}
}