|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.agg.AggregationServiceBase
com.espertech.esper.epl.agg.AggregationServiceGroupByImpl
public class AggregationServiceGroupByImpl
Implementation for handling aggregation with grouping by group-keys.
Field Summary |
---|
Fields inherited from class com.espertech.esper.epl.agg.AggregationServiceBase |
---|
aggregators, evaluators |
Constructor Summary | |
---|---|
AggregationServiceGroupByImpl(ExprEvaluator[] evaluators,
AggregationMethod[] prototypes,
MethodResolutionService methodResolutionService)
Ctor. |
Method Summary | |
---|---|
void |
applyEnter(EventBean[] eventsPerStream,
MultiKeyUntyped groupByKey)
Apply events as entering a window (new events). |
void |
applyLeave(EventBean[] eventsPerStream,
MultiKeyUntyped groupByKey)
Apply events as leaving a window (old events). |
void |
clearResults()
Clear current aggregation state. |
Object |
getValue(int column)
Returns current aggregation state, for use by expression node representing an aggregation function. |
void |
setCurrentRow(MultiKeyUntyped groupByKey)
Set the current aggregation state row - for use when evaluation nodes are asked to evaluate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AggregationServiceGroupByImpl(ExprEvaluator[] evaluators, AggregationMethod[] prototypes, MethodResolutionService methodResolutionService)
evaluators
- - evaluate the sub-expression within the aggregate function (ie. sum(4*myNum))prototypes
- - collect the aggregation state that evaluators evaluate to, act as prototypes for new aggregations
aggregation states for each groupmethodResolutionService
- - factory for creating additional aggregation method instances per group keyMethod Detail |
---|
public void clearResults()
AggregationService
public void applyEnter(EventBean[] eventsPerStream, MultiKeyUntyped groupByKey)
AggregationService
eventsPerStream
- - events for each stream entering windowgroupByKey
- - can be null if grouping without keys is desired, else the keys
to use for grouping, each distinct key value results in a new row of aggregation state.public void applyLeave(EventBean[] eventsPerStream, MultiKeyUntyped groupByKey)
AggregationService
eventsPerStream
- - events for each stream entering windowgroupByKey
- - can be null if grouping without keys is desired, else the keys
to use for grouping, each distinct key value results in a new row of aggregation state.public void setCurrentRow(MultiKeyUntyped groupByKey)
AggregationService
groupByKey
- - key identify the row of aggregation statespublic Object getValue(int column)
AggregationResultFuture
column
- is assigned to the aggregation expression node and passed as an column (index) into a row
|
© 2007 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |