com.espertech.esper.epl.agg.service
Interface AggregationService

All Superinterfaces:
AggregationResultFuture
All Known Subinterfaces:
AIRegistryAggregation
All Known Implementing Classes:
AggregationServiceBase, AggregationServiceBaseGrouped, AggregationServiceBaseUngrouped, AggregationServiceNull, AggregationServiceTable, AggSvcGroupAllAccessOnlyImpl, AggSvcGroupAllLocalGroupBy, AggSvcGroupAllMixedAccessImpl, AggSvcGroupAllMixedAccessWTableImpl, AggSvcGroupAllNoAccessImpl, AggSvcGroupByAccessOnlyImpl, AggSvcGroupByLocalGroupBy, AggSvcGroupByMixedAccessImpl, AggSvcGroupByNoAccessImpl, AggSvcGroupByReclaimAgedImpl, AggSvcGroupByRefcountedNoAccessImpl, AggSvcGroupByRefcountedWAccessImpl, AggSvcGroupByRefcountedWAccessRollupImpl, AggSvcGroupByWTableBase, AggSvcGroupByWTableImpl, AggSvcGroupByWTableRollupMultiKeyImpl, AggSvcGroupByWTableRollupSingleKeyImpl, AggSvcGroupLocalGroupByBase, AIRegistryAggregationMap, AIRegistryAggregationMultiPerm, AIRegistryAggregationSingle

public interface AggregationService
extends AggregationResultFuture

Service for maintaining aggregation state. Processes events entering (a window, a join etc,) and events leaving. Answers questions about current aggregation state for a given row.


Method Summary
 void accept(AggregationServiceVisitor visitor)
           
 void acceptGroupDetail(AggregationServiceVisitorWGroupDetail visitor)
           
 void applyEnter(EventBean[] eventsPerStream, java.lang.Object optionalGroupKeyPerRow, ExprEvaluatorContext exprEvaluatorContext)
          Apply events as entering a window (new events).
 void applyLeave(EventBean[] eventsPerStream, java.lang.Object optionalGroupKeyPerRow, ExprEvaluatorContext exprEvaluatorContext)
          Apply events as leaving a window (old events).
 void clearResults(ExprEvaluatorContext exprEvaluatorContext)
          Clear current aggregation state.
 boolean isGrouped()
           
 void setCurrentAccess(java.lang.Object groupKey, 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 interface com.espertech.esper.epl.agg.service.AggregationResultFuture
getCollectionOfEvents, getCollectionScalar, getEventBean, getGroupKey, getGroupKeys, getValue
 

Method Detail

applyEnter

void applyEnter(EventBean[] eventsPerStream,
                java.lang.Object optionalGroupKeyPerRow,
                ExprEvaluatorContext exprEvaluatorContext)
Apply events as entering a window (new events).

Parameters:
eventsPerStream - - events for each stream entering window
optionalGroupKeyPerRow - - 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 evaluatiom

applyLeave

void applyLeave(EventBean[] eventsPerStream,
                java.lang.Object optionalGroupKeyPerRow,
                ExprEvaluatorContext exprEvaluatorContext)
Apply events as leaving a window (old events).

Parameters:
eventsPerStream - - events for each stream entering window
optionalGroupKeyPerRow - - 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 evaluatiom

setCurrentAccess

void setCurrentAccess(java.lang.Object groupKey,
                      int agentInstanceId,
                      AggregationGroupByRollupLevel rollupLevel)
Set the current aggregation state row - for use when evaluation nodes are asked to evaluate.

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

clearResults

void clearResults(ExprEvaluatorContext exprEvaluatorContext)
Clear current aggregation state.

Parameters:
exprEvaluatorContext -

setRemovedCallback

void setRemovedCallback(AggregationRowRemovedCallback callback)

accept

void accept(AggregationServiceVisitor visitor)

acceptGroupDetail

void acceptGroupDetail(AggregationServiceVisitorWGroupDetail visitor)

isGrouped

boolean isGrouped()

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