se.l4.vibe.probes.Sampler Maven / Gradle / Ivy
package se.l4.vibe.probes;
/**
* Samples measured over time for a certain {@link SampledProbe}.
*
* @author Andreas Holstenson
*
*/
public interface Sampler
{
/**
* Entry within a {@link Sampler}.
*
* @author Andreas Holstenson
*
* @param
*/
interface Entry
{
/**
* Get the time this was sampled.
*
* @return
*/
long getTime();
/**
* Get the value of the sample.
*
* @return
*/
T getValue();
}
/**
* Get the probe that was used.
*
* @return
*/
SampledProbe getProbe();
/**
* Add a listener to this series.
*
* @param listener
*/
void addListener(SampleListener listener);
/**
* Remove a listener from this series.
*
* @param listener
*/
void removeListener(SampleListener listener);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy