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

netflix.ocelli.util.SingleMetric Maven / Gradle / Ivy

There is a newer version: 0.1.0-rc.2
Show newest version
package netflix.ocelli.util;

/**
 * Contract for tracking a single Metric.  For example, a SingleMetric may track an exponential moving
 * average where add() is called for each new sample and get() is called to get the current 
 * exponential moving average
 * 
 * @author elandau
 *
 * @param 
 */
public interface SingleMetric {
    /**
     * Add a new sample
     * @param sample
     */
    void add(T sample);
    
    /**
     * Reset the value to default
     */
    void reset();
    
    /**
     * @return The latest calculated value
     */
    T get();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy