com.espertech.esper.epl.agg
Interface AggregationMethod

All Known Implementing Classes:
AggregationSupport, AvedevAggregator, AvgAggregator, CountAggregator, DistinctValueAggregator, DoubleSumAggregator, FloatSumAggregator, IntegerSumAggregator, LongSumAggregator, MedianAggregator, MinMaxAggregator, NonNullCountAggregator, NumIntegerSumAggregator, StddevAggregator

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(Object value)
          Apply the value as entering aggregation (entering window).
 Object getValue()
          Returns the current value held.
 Class getValueType()
          Returns the type of the current value.
 void leave(Object value)
          Apply the value as leaving aggregation (leaving window).
 AggregationMethod newAggregator(MethodResolutionService methodResolutionService)
          Make a new, initalized aggregation state.
 

Method Detail

enter

void enter(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(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

Object getValue()
Returns the current value held.

Returns:
current value

getValueType

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

Returns:
type of values held

clear

void clear()
Clear out the collection.


newAggregator

AggregationMethod newAggregator(MethodResolutionService methodResolutionService)
Make a new, initalized aggregation state.

Parameters:
methodResolutionService - for use in creating new aggregation method instances as a factory
Returns:
initialized copy of the aggregator

© 2007 EsperTech Inc.
All rights reserved.
Visit us at espertech.com