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

com.codahale.metrics.ExponentiallyDecayingReservoir Maven / Gradle / Ivy

There is a newer version: 5.0.0
Show newest version
package com.codahale.metrics;

import static java.util.Objects.requireNonNull;

@Deprecated
public class ExponentiallyDecayingReservoir implements Reservoir {

    private final io.dropwizard.metrics5.ExponentiallyDecayingReservoir delegate;

    public ExponentiallyDecayingReservoir() {
        this(new io.dropwizard.metrics5.ExponentiallyDecayingReservoir());
    }

    public ExponentiallyDecayingReservoir(int size, double alpha) {
        this(new io.dropwizard.metrics5.ExponentiallyDecayingReservoir(size, alpha));
    }

    public ExponentiallyDecayingReservoir(int size, double alpha, Clock clock) {
        this(new io.dropwizard.metrics5.ExponentiallyDecayingReservoir(size, alpha, clock.getDelegate()));
    }

    public ExponentiallyDecayingReservoir(io.dropwizard.metrics5.ExponentiallyDecayingReservoir delegate) {
        this.delegate = requireNonNull(delegate);
    }

    @Override
    public io.dropwizard.metrics5.Reservoir getDelegate() {
        return delegate;
    }

    @Override
    public int size() {
        return delegate.size();
    }

    @Override
    public void update(long value) {
        delegate.update(value);
    }

    @Override
    public Snapshot getSnapshot() {
        return Snapshot.of(delegate.getSnapshot());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy