com.yammer.metrics.stats
Interface Sample

All Known Implementing Classes:
ExponentiallyDecayingSample, UniformSample

public interface Sample

A statistically representative sample of a data stream.


Method Summary
 void clear()
          Clears all recorded values.
 void dump(File output)
          Writes the values of the sample to the given file.
 int size()
          Returns the number of values recorded.
 void update(long value)
          Adds a new recorded value to the sample.
 List<Long> values()
          Returns a copy of the sample's values.
 

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

values

List<Long> values()
Returns a copy of the sample's values.

Returns:
a copy of the sample's values

dump

void dump(File output)
          throws IOException
Writes the values of the sample to the given file.

Parameters:
output - the file to which the values will be written
Throws:
IOException - if there is an error writing the values


Copyright © 2011. All Rights Reserved.