com.espertech.esper.epl.agg.access
Class AggregationAccessorFirstLastIndexNoEval

java.lang.Object
  extended by com.espertech.esper.epl.agg.access.AggregationAccessorFirstLastIndexNoEval
All Implemented Interfaces:
AggregationAccessor

public class AggregationAccessorFirstLastIndexNoEval
extends java.lang.Object
implements AggregationAccessor


Constructor Summary
AggregationAccessorFirstLastIndexNoEval(ExprEvaluator indexNode, int constant, boolean first)
           
 
Method Summary
 EventBean getEnumerableEvent(AggregationState state, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
          Return the aggregation state value consisting of a single event.
 java.util.Collection<EventBean> getEnumerableEvents(AggregationState state, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
          Return the aggregation state value consisting of a collection of events.
 java.util.Collection<java.lang.Object> getEnumerableScalar(AggregationState state, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
          Return the aggregation state value consisting of a collection of scalar values.
 java.lang.Object getValue(AggregationState state, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
          Return the aggregation state value either as a scalar value or any other object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregationAccessorFirstLastIndexNoEval

public AggregationAccessorFirstLastIndexNoEval(ExprEvaluator indexNode,
                                               int constant,
                                               boolean first)
Method Detail

getValue

public java.lang.Object getValue(AggregationState state,
                                 EventBean[] eventsPerStream,
                                 boolean isNewData,
                                 ExprEvaluatorContext exprEvaluatorContext)
Description copied from interface: AggregationAccessor
Return the aggregation state value either as a scalar value or any other object.

For enumeration over scalar values or objects return an array or collection of scalar or object values.

Use the #getEnumerableEvents method to return a collection of events.

Use the #getEnumerableEvent to return a single events.

Specified by:
getValue in interface AggregationAccessor
Parameters:
state - aggregation state, downcast as needed
eventsPerStream - events
isNewData - new-data indicator
exprEvaluatorContext - eval context
Returns:
return value

getEnumerableEvents

public java.util.Collection<EventBean> getEnumerableEvents(AggregationState state,
                                                           EventBean[] eventsPerStream,
                                                           boolean isNewData,
                                                           ExprEvaluatorContext exprEvaluatorContext)
Description copied from interface: AggregationAccessor
Return the aggregation state value consisting of a collection of events.

Specified by:
getEnumerableEvents in interface AggregationAccessor
Parameters:
state - aggregation state, downcast as needed
eventsPerStream - events
isNewData - new-data indicator
exprEvaluatorContext - eval context
Returns:
return collection of events or null or empty collection

getEnumerableScalar

public java.util.Collection<java.lang.Object> getEnumerableScalar(AggregationState state,
                                                                  EventBean[] eventsPerStream,
                                                                  boolean isNewData,
                                                                  ExprEvaluatorContext exprEvaluatorContext)
Description copied from interface: AggregationAccessor
Return the aggregation state value consisting of a collection of scalar values.

Specified by:
getEnumerableScalar in interface AggregationAccessor
Parameters:
state - aggregation state, downcast as needed
eventsPerStream - events
isNewData - new-data indicator
exprEvaluatorContext - eval context
Returns:
return collection of scalar or null or empty collection

getEnumerableEvent

public EventBean getEnumerableEvent(AggregationState state,
                                    EventBean[] eventsPerStream,
                                    boolean isNewData,
                                    ExprEvaluatorContext exprEvaluatorContext)
Description copied from interface: AggregationAccessor
Return the aggregation state value consisting of a single event.

Specified by:
getEnumerableEvent in interface AggregationAccessor
Parameters:
state - aggregation state, downcast as needed
eventsPerStream - events
isNewData - new-data indicator
exprEvaluatorContext - eval context
Returns:
return event or null

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