Interface Reservoir

  • All Known Implementing Classes:
    ExponentiallyDecayingReservoir

    public interface Reservoir
    A statistically representative reservoir of a data stream.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.eclipse.microprofile.metrics.Snapshot getSnapshot()
      Returns a snapshot of the reservoir's values.
      int size()
      Returns the number of values recorded.
      void update​(long value)
      Adds a new recorded value to the reservoir.
    • Method Detail

      • size

        int size()
        Returns the number of values recorded.
        Returns:
        the number of values recorded
      • update

        void update​(long value)
        Adds a new recorded value to the reservoir.
        Parameters:
        value - a new recorded value
      • getSnapshot

        org.eclipse.microprofile.metrics.Snapshot getSnapshot()
        Returns a snapshot of the reservoir's values.
        Returns:
        a snapshot of the reservoir's values