com.twitter.common.stats
Interface TimeSeriesRepository

All Known Implementing Classes:
TimeSeriesRepositoryImpl

public interface TimeSeriesRepository

A repository for time series data.


Method Summary
 TimeSeries get(String name)
          Fetches a time series by name.
 Set<String> getAvailableSeries()
          Fetches the names of all available time series.
 Iterable<Number> getTimestamps()
          Gets an ordered iterable of the timestamps that all timeseries were sampled at.
 void start(ShutdownRegistry shutdownRegistry)
          Starts the time series sampler.
 

Method Detail

start

void start(ShutdownRegistry shutdownRegistry)
Starts the time series sampler.

Parameters:
shutdownRegistry - An action registry that the repository can use to register a shutdown for the sampler.

getAvailableSeries

Set<String> getAvailableSeries()
Fetches the names of all available time series.

Returns:
Available time series, which can then be obtained by calling get(String).

get

TimeSeries get(String name)
Fetches a time series by name.

Parameters:
name - The name of the time series to fetch.
Returns:
The time series registered with the given name, or null if no such time series has been registered.

getTimestamps

Iterable<Number> getTimestamps()
Gets an ordered iterable of the timestamps that all timeseries were sampled at.

Returns:
All current timestamps.