net.opentsdb.core
Interface Aggregator


public interface Aggregator

A function capable of aggregating multiple DataPoints together.

All aggregators must be stateless. All they can do is run through a sequence of Longs or Doubles and return an aggregated value.


Nested Class Summary
static interface Aggregator.Doubles
          A sequence of doubles.
static interface Aggregator.Longs
          A sequence of longs.
 
Method Summary
 double runDouble(Aggregator.Doubles values)
          Aggregates a sequence of doubles.
 long runLong(Aggregator.Longs values)
          Aggregates a sequence of longs.
 

Method Detail

runLong

long runLong(Aggregator.Longs values)
Aggregates a sequence of longs.

Parameters:
values - The sequence to aggregate.
Returns:
The aggregated value.

runDouble

double runDouble(Aggregator.Doubles values)
Aggregates a sequence of doubles.

Parameters:
values - The sequence to aggregate.
Returns:
The aggregated value.