com.espertech.esper.core.context.stmt
Class AIRegistryAggregationMap

java.lang.Object
  extended by com.espertech.esper.core.context.stmt.AIRegistryAggregationMap
All Implemented Interfaces:
AIRegistryAggregation, AggregationResultFuture, AggregationService

public class AIRegistryAggregationMap
extends java.lang.Object
implements AIRegistryAggregation


Constructor Summary
AIRegistryAggregationMap()
           
 
Method Summary
 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 assignService(int serviceId, AggregationService aggregationService)
           
 void clearResults(ExprEvaluatorContext exprEvaluatorContext)
          Clear current aggregation state.
 void deassignService(int serviceId)
           
 java.util.Collection<EventBean> getCollection(int column, ExprEvaluatorContext context)
           
 EventBean getEventBean(int column, ExprEvaluatorContext context)
           
 int getInstanceCount()
           
 java.lang.Object getValue(int column, int agentInstanceId)
          Returns current aggregation state, for use by expression node representing an aggregation function.
 void setCurrentAccess(java.lang.Object groupKey, int agentInstanceId)
          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
 

Constructor Detail

AIRegistryAggregationMap

public AIRegistryAggregationMap()
Method Detail

assignService

public void assignService(int serviceId,
                          AggregationService aggregationService)
Specified by:
assignService in interface AIRegistryAggregation

deassignService

public void deassignService(int serviceId)
Specified by:
deassignService in interface AIRegistryAggregation

getInstanceCount

public int getInstanceCount()
Specified by:
getInstanceCount in interface AIRegistryAggregation

applyEnter

public void applyEnter(EventBean[] eventsPerStream,
                       java.lang.Object optionalGroupKeyPerRow,
                       ExprEvaluatorContext exprEvaluatorContext)
Description copied from interface: AggregationService
Apply events as entering a window (new events).

Specified by:
applyEnter in interface AggregationService
Parameters:
eventsPerStream - - events for each stream entering window
optionalGroupKeyPerRow - - 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.
exprEvaluatorContext - context for expression evaluatiom

applyLeave

public void applyLeave(EventBean[] eventsPerStream,
                       java.lang.Object optionalGroupKeyPerRow,
                       ExprEvaluatorContext exprEvaluatorContext)
Description copied from interface: AggregationService
Apply events as leaving a window (old events).

Specified by:
applyLeave in interface AggregationService
Parameters:
eventsPerStream - - events for each stream entering window
optionalGroupKeyPerRow - - 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.
exprEvaluatorContext - context for expression evaluatiom

setCurrentAccess

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

Specified by:
setCurrentAccess in interface AggregationService
Parameters:
groupKey - - key identify the row of aggregation states
agentInstanceId - context partition id

clearResults

public void clearResults(ExprEvaluatorContext exprEvaluatorContext)
Description copied from interface: AggregationService
Clear current aggregation state.

Specified by:
clearResults in interface AggregationService

getValue

public java.lang.Object getValue(int column,
                                 int agentInstanceId)
Description copied from interface: AggregationResultFuture
Returns current aggregation state, for use by expression node representing an aggregation function.

Specified by:
getValue in interface AggregationResultFuture
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

getCollection

public java.util.Collection<EventBean> getCollection(int column,
                                                     ExprEvaluatorContext context)
Specified by:
getCollection in interface AggregationResultFuture

getEventBean

public EventBean getEventBean(int column,
                              ExprEvaluatorContext context)
Specified by:
getEventBean in interface AggregationResultFuture

setRemovedCallback

public void setRemovedCallback(AggregationRowRemovedCallback callback)
Specified by:
setRemovedCallback in interface AggregationService

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