org.apache.solr.util.stats

## Interface Sample

- All Known Implementing Classes:
    ExponentiallyDecayingSample, UniformSample

      public interface Sample

  A statistically representative sample of a data stream.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()` Clears all recorded values.
    `Snapshot` | `getSnapshot()` Returns a snapshot of the sample's values.
    `int` | `size()` Returns the number of values recorded.
    `void` | `update(long value)` Adds a new recorded value to the sample.

- - ### Method Detail

    - #### clear

          void clear()

      Clears all recorded values.

    - #### 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 sample.
      Parameters:
        `value` - a new recorded value

    - #### getSnapshot

          Snapshot getSnapshot()

      Returns a snapshot of the sample's values.
      Returns:
        a snapshot of the sample's values

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.