|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.agg.service.AggSvcGroupLocalGroupByBase
public abstract class AggSvcGroupLocalGroupByBase
Implementation for handling aggregation with grouping by group-keys.
Field Summary | |
---|---|
protected java.util.Map<java.lang.Object,AggregationMethodPairRow>[] |
aggregatorsPerLevelAndGroup
|
protected AggregationMethod[] |
aggregatorsTopLevel
|
protected java.lang.Object |
groupKeyBinding
|
protected boolean |
isJoin
|
protected AggregationLocalGroupByPlan |
localGroupByPlan
|
protected MethodResolutionService |
methodResolutionService
|
protected java.util.List<Pair<java.lang.Integer,java.lang.Object>> |
removedKeys
|
protected AggregationState[] |
statesTopLevel
|
Constructor Summary | |
---|---|
AggSvcGroupLocalGroupByBase(MethodResolutionService methodResolutionService,
boolean isJoin,
AggregationLocalGroupByPlan localGroupByPlan,
java.lang.Object groupKeyBinding)
|
Method Summary | |
---|---|
void |
accept(AggregationServiceVisitor visitor)
|
void |
acceptGroupDetail(AggregationServiceVisitorWGroupDetail visitor)
|
static void |
aggregateIntoEnter(AggregationLocalGroupByLevel level,
AggregationMethod[] methods,
AggregationState[] states,
EventBean[] eventsPerStream,
ExprEvaluatorContext exprEvaluatorContext)
|
static void |
aggregateIntoLeave(AggregationLocalGroupByLevel level,
AggregationMethod[] methods,
AggregationState[] states,
EventBean[] eventsPerStream,
ExprEvaluatorContext exprEvaluatorContext)
|
void |
applyEnter(EventBean[] eventsPerStream,
java.lang.Object groupByKeyProvided,
ExprEvaluatorContext exprEvaluatorContext)
Apply events as entering a window (new events). |
void |
applyLeave(EventBean[] eventsPerStream,
java.lang.Object groupByKeyProvided,
ExprEvaluatorContext exprEvaluatorContext)
Apply events as leaving a window (old events). |
void |
clearResults(ExprEvaluatorContext exprEvaluatorContext)
Clear current aggregation state. |
protected static void |
clearResults(java.util.Map<java.lang.Object,AggregationMethodPairRow>[] aggregatorsPerLevelAndGroup,
AggregationMethod[] aggregatorsTopLevel,
AggregationState[] statesTopLevel)
|
protected abstract java.lang.Object |
computeGroupKey(AggregationLocalGroupByLevel level,
java.lang.Object groupKey,
ExprEvaluator[] partitionEval,
EventBean[] eventsPerStream,
boolean newData,
ExprEvaluatorContext exprEvaluatorContext)
|
static java.lang.Object |
computeGroupKey(ExprEvaluator[] partitionEval,
EventBean[] eventsPerStream,
boolean b,
ExprEvaluatorContext exprEvaluatorContext)
|
java.util.Map<java.lang.Object,AggregationMethodPairRow>[] |
getAggregatorsPerLevelAndGroup()
|
AggregationMethod[] |
getAggregatorsTopLevel()
|
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.util.List<Pair<java.lang.Integer,java.lang.Object>> |
getRemovedKeys()
|
AggregationState[] |
getStatesTopLevel()
|
void |
handleRemovedKeys()
|
void |
internalHandleGroupRemove(Pair<java.lang.Integer,java.lang.Object> groupByKey)
|
void |
internalHandleUpdatedGroup(int level,
java.lang.Object groupByKey,
AggregationMethodPairRow row)
|
void |
internalHandleUpdatedTop()
|
boolean |
isGrouped()
|
void |
setAggregatorsPerLevelAndGroup(java.util.Map<java.lang.Object,AggregationMethodPairRow>[] aggregatorsPerLevelAndGroup)
|
void |
setAggregatorsTopLevel(AggregationMethod[] aggregatorsTopLevel)
|
void |
setRemovedCallback(AggregationRowRemovedCallback callback)
|
void |
setRemovedKeys(java.util.List<Pair<java.lang.Integer,java.lang.Object>> removedKeys)
|
void |
setStatesTopLevel(AggregationState[] statesTopLevel)
|
void |
stop()
Stops the underlying resources. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.espertech.esper.epl.agg.service.AggregationService |
---|
setCurrentAccess |
Methods inherited from interface com.espertech.esper.epl.agg.service.AggregationResultFuture |
---|
getValue |
Field Detail |
---|
protected final MethodResolutionService methodResolutionService
protected final boolean isJoin
protected final AggregationLocalGroupByPlan localGroupByPlan
protected final java.lang.Object groupKeyBinding
protected AggregationMethod[] aggregatorsTopLevel
protected AggregationState[] statesTopLevel
protected java.util.Map<java.lang.Object,AggregationMethodPairRow>[] aggregatorsPerLevelAndGroup
protected java.util.List<Pair<java.lang.Integer,java.lang.Object>> removedKeys
Constructor Detail |
---|
public AggSvcGroupLocalGroupByBase(MethodResolutionService methodResolutionService, boolean isJoin, AggregationLocalGroupByPlan localGroupByPlan, java.lang.Object groupKeyBinding)
Method Detail |
---|
protected abstract java.lang.Object computeGroupKey(AggregationLocalGroupByLevel level, java.lang.Object groupKey, ExprEvaluator[] partitionEval, EventBean[] eventsPerStream, boolean newData, ExprEvaluatorContext exprEvaluatorContext)
public void clearResults(ExprEvaluatorContext exprEvaluatorContext)
AggregationService
clearResults
in interface AggregationService
public void applyEnter(EventBean[] eventsPerStream, java.lang.Object groupByKeyProvided, ExprEvaluatorContext exprEvaluatorContext)
AggregationService
applyEnter
in interface AggregationService
eventsPerStream
- - events for each stream entering windowgroupByKeyProvided
- - 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 groupByKeyProvided, ExprEvaluatorContext exprEvaluatorContext)
AggregationService
applyLeave
in interface AggregationService
eventsPerStream
- - events for each stream entering windowgroupByKeyProvided
- - 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 java.util.Collection<EventBean> getCollectionOfEvents(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
getCollectionOfEvents
in interface AggregationResultFuture
public java.util.Collection<java.lang.Object> getCollectionScalar(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
getCollectionScalar
in interface AggregationResultFuture
public EventBean getEventBean(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
getEventBean
in interface AggregationResultFuture
public boolean isGrouped()
isGrouped
in interface AggregationService
public void setRemovedCallback(AggregationRowRemovedCallback callback)
setRemovedCallback
in interface AggregationService
public void accept(AggregationServiceVisitor visitor)
accept
in interface AggregationService
public void acceptGroupDetail(AggregationServiceVisitorWGroupDetail visitor)
acceptGroupDetail
in interface AggregationService
public void internalHandleUpdatedGroup(int level, java.lang.Object groupByKey, AggregationMethodPairRow row)
public void internalHandleUpdatedTop()
public void internalHandleGroupRemove(Pair<java.lang.Integer,java.lang.Object> groupByKey)
public void handleRemovedKeys()
public java.lang.Object getGroupKey(int agentInstanceId)
getGroupKey
in interface AggregationResultFuture
public java.util.Collection<java.lang.Object> getGroupKeys(ExprEvaluatorContext exprEvaluatorContext)
getGroupKeys
in interface AggregationResultFuture
public static java.lang.Object computeGroupKey(ExprEvaluator[] partitionEval, EventBean[] eventsPerStream, boolean b, ExprEvaluatorContext exprEvaluatorContext)
public static void aggregateIntoEnter(AggregationLocalGroupByLevel level, AggregationMethod[] methods, AggregationState[] states, EventBean[] eventsPerStream, ExprEvaluatorContext exprEvaluatorContext)
public static void aggregateIntoLeave(AggregationLocalGroupByLevel level, AggregationMethod[] methods, AggregationState[] states, EventBean[] eventsPerStream, ExprEvaluatorContext exprEvaluatorContext)
protected static void clearResults(java.util.Map<java.lang.Object,AggregationMethodPairRow>[] aggregatorsPerLevelAndGroup, AggregationMethod[] aggregatorsTopLevel, AggregationState[] statesTopLevel)
public AggregationMethod[] getAggregatorsTopLevel()
public void setAggregatorsTopLevel(AggregationMethod[] aggregatorsTopLevel)
public AggregationState[] getStatesTopLevel()
public void setStatesTopLevel(AggregationState[] statesTopLevel)
public java.util.Map<java.lang.Object,AggregationMethodPairRow>[] getAggregatorsPerLevelAndGroup()
public void setAggregatorsPerLevelAndGroup(java.util.Map<java.lang.Object,AggregationMethodPairRow>[] aggregatorsPerLevelAndGroup)
public java.util.List<Pair<java.lang.Integer,java.lang.Object>> getRemovedKeys()
public void setRemovedKeys(java.util.List<Pair<java.lang.Integer,java.lang.Object>> removedKeys)
public void stop()
StopCallback
stop
in interface StopCallback
|
© 2006-2016 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 |