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

java.lang.Object
  extended by com.espertech.esper.epl.agg.service.AggregationServiceMatchRecognizeImpl
All Implemented Interfaces:
AggregationResultFuture, AggregationServiceMatchRecognize

public class AggregationServiceMatchRecognizeImpl
extends java.lang.Object
implements AggregationServiceMatchRecognize

Implements an aggregation service for match recognize.


Constructor Summary
AggregationServiceMatchRecognizeImpl(ExprEvaluator[][] evaluatorsEachStream, AggregationMethod[][] aggregatorsEachStream, AggregationMethod[] aggregatorsAll)
           
 
Method Summary
 void applyEnter(EventBean[] eventsPerStream, int streamId, ExprEvaluatorContext exprEvaluatorContext)
          Enter a single event row consisting of one or more events per stream (each stream representing a variable).
 void clearResults()
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregationServiceMatchRecognizeImpl

public AggregationServiceMatchRecognizeImpl(ExprEvaluator[][] evaluatorsEachStream,
                                            AggregationMethod[][] aggregatorsEachStream,
                                            AggregationMethod[] aggregatorsAll)
Method Detail

applyEnter

public void applyEnter(EventBean[] eventsPerStream,
                       int streamId,
                       ExprEvaluatorContext exprEvaluatorContext)
Description copied from interface: AggregationServiceMatchRecognize
Enter a single event row consisting of one or more events per stream (each stream representing a variable).

Specified by:
applyEnter in interface AggregationServiceMatchRecognize
Parameters:
eventsPerStream - events per stream
streamId - variable number that is the base
exprEvaluatorContext - context for expression evaluatiom

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.

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

getCollectionOfEvents

public java.util.Collection<EventBean> getCollectionOfEvents(int column,
                                                             EventBean[] eventsPerStream,
                                                             boolean isNewData,
                                                             ExprEvaluatorContext context)
Specified by:
getCollectionOfEvents in interface AggregationResultFuture

getCollectionScalar

public java.util.Collection<java.lang.Object> getCollectionScalar(int column,
                                                                  EventBean[] eventsPerStream,
                                                                  boolean isNewData,
                                                                  ExprEvaluatorContext context)
Specified by:
getCollectionScalar in interface AggregationResultFuture

getEventBean

public EventBean getEventBean(int column,
                              EventBean[] eventsPerStream,
                              boolean isNewData,
                              ExprEvaluatorContext context)
Specified by:
getEventBean in interface AggregationResultFuture

clearResults

public void clearResults()
Description copied from interface: AggregationServiceMatchRecognize
Clear current aggregation state.

Specified by:
clearResults in interface AggregationServiceMatchRecognize

getGroupKey

public java.lang.Object getGroupKey(int agentInstanceId)
Specified by:
getGroupKey in interface AggregationResultFuture

getGroupKeys

public java.util.Collection<java.lang.Object> getGroupKeys(ExprEvaluatorContext exprEvaluatorContext)
Specified by:
getGroupKeys in interface AggregationResultFuture

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