|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.agg.service.AggregationServiceBaseGrouped
com.espertech.esper.epl.agg.service.AggSvcGroupByRefcountedWAccessRollupImpl
public class AggSvcGroupByRefcountedWAccessRollupImpl
Implementation for handling aggregation with grouping by group-keys.
Field Summary | |
---|---|
protected AggregationStateFactory[] |
accessAggregations
|
protected AggregationAccessorSlotPair[] |
accessors
|
protected java.util.Map<java.lang.Object,AggregationMethodPairRow>[] |
aggregatorsPerGroup
|
protected AggregationMethodPairRow |
aggregatorTopGroup
|
protected boolean |
hasRemovedKey
|
protected boolean |
isJoin
|
protected java.lang.Object[] |
methodParameterValues
|
protected java.util.List<java.lang.Object>[] |
removedKeys
|
protected AggregationGroupByRollupDesc |
rollupLevelDesc
|
Fields inherited from class com.espertech.esper.epl.agg.service.AggregationServiceBaseGrouped |
---|
aggregators, evaluators, groupKeyBinding |
Constructor Summary | |
---|---|
AggSvcGroupByRefcountedWAccessRollupImpl(ExprEvaluator[] evaluators,
AggregationMethodFactory[] prototypes,
java.lang.Object groupKeyBinding,
MethodResolutionService methodResolutionService,
AggregationAccessorSlotPair[] accessors,
AggregationStateFactory[] accessAggregations,
boolean isJoin,
AggregationGroupByRollupDesc rollupLevelDesc,
AggregationMethod[] topGroupAggregators,
AggregationState[] topGroupStates)
Ctor. |
Method Summary | |
---|---|
void |
accept(AggregationServiceVisitor visitor)
|
void |
acceptGroupDetail(AggregationServiceVisitorWGroupDetail visitor)
|
void |
applyEnter(EventBean[] eventsPerStream,
java.lang.Object compositeGroupKey,
ExprEvaluatorContext exprEvaluatorContext)
Apply events as entering a window (new events). |
void |
applyLeave(EventBean[] eventsPerStream,
java.lang.Object compositeGroupKey,
ExprEvaluatorContext exprEvaluatorContext)
Apply events as leaving a window (old events). |
void |
clearResults(ExprEvaluatorContext exprEvaluatorContext)
Clear current aggregation state. |
java.util.Collection<EventBean> |
getCollectionOfEvents(int column,
EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext context)
|
java.util.Collection<java.lang.Object> |
getCollectionScalar(int column,
EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext context)
|
EventBean |
getEventBean(int column,
EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext context)
|
java.lang.Object |
getGroupKey(int agentInstanceId)
|
java.util.Collection<java.lang.Object> |
getGroupKeys(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. |
protected void |
handleRemovedKeys()
|
void |
internalHandleGroupRemove(java.lang.Object groupByKey,
AggregationGroupByRollupLevel groupByRollupLevel)
|
void |
internalHandleGroupUpdate(java.lang.Object groupByKey,
AggregationMethodPairRow row,
AggregationGroupByRollupLevel groupByRollupLevel)
|
boolean |
isGrouped()
|
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. |
void |
setRemovedCallback(AggregationRowRemovedCallback callback)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final AggregationAccessorSlotPair[] accessors
protected final AggregationStateFactory[] accessAggregations
protected final boolean isJoin
protected final AggregationGroupByRollupDesc rollupLevelDesc
protected java.util.Map<java.lang.Object,AggregationMethodPairRow>[] aggregatorsPerGroup
protected AggregationMethodPairRow aggregatorTopGroup
protected final java.lang.Object[] methodParameterValues
protected boolean hasRemovedKey
protected final java.util.List<java.lang.Object>[] removedKeys
Constructor Detail |
---|
public AggSvcGroupByRefcountedWAccessRollupImpl(ExprEvaluator[] evaluators, AggregationMethodFactory[] prototypes, java.lang.Object groupKeyBinding, MethodResolutionService methodResolutionService, AggregationAccessorSlotPair[] accessors, AggregationStateFactory[] accessAggregations, boolean isJoin, AggregationGroupByRollupDesc rollupLevelDesc, AggregationMethod[] topGroupAggregators, AggregationState[] topGroupStates)
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 keyaccessors
- accessor definitionsaccessAggregations
- access aggsisJoin
- true for join, false for single-streamMethod Detail |
---|
public void clearResults(ExprEvaluatorContext exprEvaluatorContext)
AggregationService
public void applyEnter(EventBean[] eventsPerStream, java.lang.Object compositeGroupKey, ExprEvaluatorContext exprEvaluatorContext)
AggregationService
eventsPerStream
- - events for each stream entering windowcompositeGroupKey
- - can be null if grouping without keys is desired, else the keys
or array of keys to use for grouping, each distinct key value results in a new row of aggregation state.exprEvaluatorContext
- context for expression evaluatiompublic void applyLeave(EventBean[] eventsPerStream, java.lang.Object compositeGroupKey, ExprEvaluatorContext exprEvaluatorContext)
AggregationService
eventsPerStream
- - events for each stream entering windowcompositeGroupKey
- - can be null if grouping without keys is desired, else the keys
or array of keys to use for grouping, each distinct key value results in a new row of aggregation state.exprEvaluatorContext
- context for expression evaluatiompublic void setCurrentAccess(java.lang.Object groupByKey, int agentInstanceId, AggregationGroupByRollupLevel rollupLevel)
AggregationService
groupByKey
- - single key identifying the row of aggregation statesagentInstanceId
- context partition idpublic java.lang.Object getValue(int column, int agentInstanceId, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
AggregationResultFuture
column
- is assigned to the aggregation expression node and passed as an column (index) into a rowagentInstanceId
- the context partition id
public java.util.Collection<EventBean> getCollectionOfEvents(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
public java.util.Collection<java.lang.Object> getCollectionScalar(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
public EventBean getEventBean(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
public void setRemovedCallback(AggregationRowRemovedCallback callback)
public void internalHandleGroupUpdate(java.lang.Object groupByKey, AggregationMethodPairRow row, AggregationGroupByRollupLevel groupByRollupLevel)
public void internalHandleGroupRemove(java.lang.Object groupByKey, AggregationGroupByRollupLevel groupByRollupLevel)
public void accept(AggregationServiceVisitor visitor)
public void acceptGroupDetail(AggregationServiceVisitorWGroupDetail visitor)
public boolean isGrouped()
protected void handleRemovedKeys()
public java.lang.Object getGroupKey(int agentInstanceId)
public java.util.Collection<java.lang.Object> getGroupKeys(ExprEvaluatorContext exprEvaluatorContext)
|
© 2006-2015 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 |