com.espertech.esper.epl.agg.aggregator
Interface AggregationMethod

All Known Implementing Classes:
AggregatorAvedev, AggregatorAvedevFilter, AggregatorAvg, AggregatorAvgBigDecimal, AggregatorAvgBigDecimalFilter, AggregatorAvgFilter, AggregatorCount, AggregatorCountEver, AggregatorCountEverFilter, AggregatorCountEverNonNull, AggregatorCountEverNonNullFilter, AggregatorCountFilter, AggregatorCountNonNull, AggregatorCountNonNullFilter, AggregatorDistinctValue, AggregatorDistinctValueFilter, AggregatorFirstEver, AggregatorFirstEverFilter, AggregatorLastEver, AggregatorLastEverFilter, AggregatorLeaving, AggregatorMedian, AggregatorMedianFilter, AggregatorMinMax, AggregatorMinMaxEver, AggregatorMinMaxEverFilter, AggregatorMinMaxFilter, AggregatorNth, AggregatorRate, AggregatorRateEver, AggregatorStddev, AggregatorStddevFilter, AggregatorSumBigDecimal, AggregatorSumBigDecimalFilter, AggregatorSumBigInteger, AggregatorSumBigIntegerFilter, AggregatorSumDouble, AggregatorSumDoubleFilter, AggregatorSumFloat, AggregatorSumFloatFilter, AggregatorSumInteger, AggregatorSumIntegerFilter, AggregatorSumLong, AggregatorSumLongFilter, AggregatorSumNumInteger, AggregatorSumNumIntegerFilter

public interface AggregationMethod

Maintains aggregation state applying values as entering and leaving the state.

Implementations must also act as a factory for further independent copies of aggregation states such that new aggregation state holders and be created from a prototype.


Method Summary
 void clear()
          Clear out the collection.
 void enter(java.lang.Object value)
          Apply the value as entering aggregation (entering window).
 java.lang.Object getValue()
          Returns the current value held.
 java.lang.Class getValueType()
          Returns the type of the current value.
 void leave(java.lang.Object value)
          Apply the value as leaving aggregation (leaving window).
 

Method Detail

enter

void enter(java.lang.Object value)
Apply the value as entering aggregation (entering window).

The value can be null since 'null' values may be counted as unique separate values.

Parameters:
value - to add to aggregate

leave

void leave(java.lang.Object value)
Apply the value as leaving aggregation (leaving window).

The value can be null since 'null' values may be counted as unique separate values.

Parameters:
value - to remove from aggregate

getValue

java.lang.Object getValue()
Returns the current value held.

Returns:
current value

getValueType

java.lang.Class getValueType()
Returns the type of the current value.

Returns:
type of values held

clear

void clear()
Clear out the collection.


© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com