com.espertech.esper.epl.agg.access
Interface AggregationAccessor

All Known Implementing Classes:
AggregationAccessorFirstLastIndexNoEval, AggregationAccessorFirstLastIndexWEval, AggregationAccessorFirstNoEval, AggregationAccessorFirstWEval, AggregationAccessorLastNoEval, AggregationAccessorLastWEval, AggregationAccessorMinMaxByBase, AggregationAccessorMinMaxByNonTable, AggregationAccessorMinMaxByTable, AggregationAccessorSortedNonTable, AggregationAccessorSortedTable, AggregationAccessorWindowNoEval, AggregationAccessorWindowWEval, CountMinSketchAggAccessorDefault, CountMinSketchAggAccessorFrequency, CountMinSketchAggAccessorTopk

public interface AggregationAccessor

Accessor for access aggregation functions.


Method Summary
 EventBean getEnumerableEvent(AggregationState state, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
          Return the aggregation state value consisting of a single event.
 java.util.Collection<EventBean> getEnumerableEvents(AggregationState state, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
          Return the aggregation state value consisting of a collection of events.
 java.util.Collection<java.lang.Object> getEnumerableScalar(AggregationState state, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
          Return the aggregation state value consisting of a collection of scalar values.
 java.lang.Object getValue(AggregationState state, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
          Return the aggregation state value either as a scalar value or any other object.
 

Method Detail

getValue

java.lang.Object getValue(AggregationState state,
                          EventBean[] eventsPerStream,
                          boolean isNewData,
                          ExprEvaluatorContext exprEvaluatorContext)
Return the aggregation state value either as a scalar value or any other object.

For enumeration over scalar values or objects return an array or collection of scalar or object values.

Use the #getEnumerableEvents method to return a collection of events.

Use the #getEnumerableEvent to return a single events.

Parameters:
state - aggregation state, downcast as needed
eventsPerStream - events
isNewData - new-data indicator
exprEvaluatorContext - eval context
Returns:
return value

getEnumerableEvents

java.util.Collection<EventBean> getEnumerableEvents(AggregationState state,
                                                    EventBean[] eventsPerStream,
                                                    boolean isNewData,
                                                    ExprEvaluatorContext exprEvaluatorContext)
Return the aggregation state value consisting of a collection of events.

Parameters:
state - aggregation state, downcast as needed
eventsPerStream - events
isNewData - new-data indicator
exprEvaluatorContext - eval context
Returns:
return collection of events or null or empty collection

getEnumerableEvent

EventBean getEnumerableEvent(AggregationState state,
                             EventBean[] eventsPerStream,
                             boolean isNewData,
                             ExprEvaluatorContext exprEvaluatorContext)
Return the aggregation state value consisting of a single event.

Parameters:
state - aggregation state, downcast as needed
eventsPerStream - events
isNewData - new-data indicator
exprEvaluatorContext - eval context
Returns:
return event or null

getEnumerableScalar

java.util.Collection<java.lang.Object> getEnumerableScalar(AggregationState state,
                                                           EventBean[] eventsPerStream,
                                                           boolean isNewData,
                                                           ExprEvaluatorContext exprEvaluatorContext)
Return the aggregation state value consisting of a collection of scalar values.

Parameters:
state - aggregation state, downcast as needed
eventsPerStream - events
isNewData - new-data indicator
exprEvaluatorContext - eval context
Returns:
return collection of scalar or null or empty collection

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