com.espertech.esper.epl.agg.service
Class AggSvcGroupByLocalGroupBy

java.lang.Object
  extended by com.espertech.esper.epl.agg.service.AggSvcGroupLocalGroupByBase
      extended by com.espertech.esper.epl.agg.service.AggSvcGroupByLocalGroupBy
All Implemented Interfaces:
AggregationResultFuture, AggregationService

public class AggSvcGroupByLocalGroupBy
extends AggSvcGroupLocalGroupByBase

Implementation for handling aggregation with grouping by group-keys.


Field Summary
 
Fields inherited from class com.espertech.esper.epl.agg.service.AggSvcGroupLocalGroupByBase
aggregatorsPerLevelAndGroup, aggregatorsTopLevel, groupKeyBinding, isJoin, localGroupByPlan, methodResolutionService, removedKeys, statesTopLevel
 
Constructor Summary
AggSvcGroupByLocalGroupBy(MethodResolutionService methodResolutionService, boolean isJoin, AggregationLocalGroupByPlan localGroupByPlan, java.lang.Object groupKeyBinding)
           
 
Method Summary
protected  java.lang.Object computeGroupKey(AggregationLocalGroupByLevel level, java.lang.Object groupKey, ExprEvaluator[] partitionEval, EventBean[] eventsPerStream, boolean newData, ExprEvaluatorContext exprEvaluatorContext)
           
 java.lang.Object getValue(int column, int agentInstanceId, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
          Returns current aggregation state, for use by expression node representing an aggregation function.
 void setCurrentAccess(java.lang.Object groupByKey, int agentInstanceId, AggregationGroupByRollupLevel rollupLevel)
          Set the current aggregation state row - for use when evaluation nodes are asked to evaluate.
 
Methods inherited from class com.espertech.esper.epl.agg.service.AggSvcGroupLocalGroupByBase
accept, acceptGroupDetail, aggregateIntoEnter, aggregateIntoLeave, applyEnter, applyLeave, clearResults, clearResults, computeGroupKey, getAggregatorsPerLevelAndGroup, getAggregatorsTopLevel, getCollectionOfEvents, getCollectionScalar, getEventBean, getGroupKey, getGroupKeys, getRemovedKeys, getStatesTopLevel, handleRemovedKeys, internalHandleGroupRemove, internalHandleUpdatedGroup, internalHandleUpdatedTop, isGrouped, setAggregatorsPerLevelAndGroup, setAggregatorsTopLevel, setRemovedCallback, setRemovedKeys, setStatesTopLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggSvcGroupByLocalGroupBy

public AggSvcGroupByLocalGroupBy(MethodResolutionService methodResolutionService,
                                 boolean isJoin,
                                 AggregationLocalGroupByPlan localGroupByPlan,
                                 java.lang.Object groupKeyBinding)
Method Detail

computeGroupKey

protected java.lang.Object computeGroupKey(AggregationLocalGroupByLevel level,
                                           java.lang.Object groupKey,
                                           ExprEvaluator[] partitionEval,
                                           EventBean[] eventsPerStream,
                                           boolean newData,
                                           ExprEvaluatorContext exprEvaluatorContext)
Specified by:
computeGroupKey in class AggSvcGroupLocalGroupByBase

setCurrentAccess

public void setCurrentAccess(java.lang.Object groupByKey,
                             int agentInstanceId,
                             AggregationGroupByRollupLevel rollupLevel)
Description copied from interface: AggregationService
Set the current aggregation state row - for use when evaluation nodes are asked to evaluate.

Parameters:
groupByKey - - single key identifying the row of aggregation states
agentInstanceId - context partition id

getValue

public java.lang.Object getValue(int column,
                                 int agentInstanceId,
                                 EventBean[] eventsPerStream,
                                 boolean isNewData,
                                 ExprEvaluatorContext exprEvaluatorContext)
Description copied from interface: AggregationResultFuture
Returns current aggregation state, for use by expression node representing an aggregation function.

Parameters:
column - is assigned to the aggregation expression node and passed as an column (index) into a row
agentInstanceId - the context partition id
Returns:
current aggragation state

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