|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.epl.agg.access.AggregationStateImpl
public class AggregationStateImpl
Implementation of access function for single-stream (not joins).
Field Summary | |
---|---|
protected java.util.ArrayList<EventBean> |
events
|
protected int |
streamId
|
Constructor Summary | |
---|---|
AggregationStateImpl(int streamId)
Ctor. |
Method Summary | |
---|---|
void |
applyEnter(EventBean[] eventsPerStream,
ExprEvaluatorContext exprEvaluatorContext)
Enter an event. |
void |
applyLeave(EventBean[] eventsPerStream,
ExprEvaluatorContext exprEvaluatorContext)
Remove an event. |
void |
clear()
Clear all events in the group. |
java.util.Collection<EventBean> |
collectionReadOnly()
Returns all events for the group. |
EventBean |
getFirstNthValue(int index)
Counting from the first element to the last, returns the oldest (first) value entered for index zero and the n-th oldest value for index N. |
EventBean |
getFirstValue()
Returns the first (oldest) value entered. |
EventBean |
getLastNthValue(int index)
Counting from the last element to the first, returns the newest (last) value entered for index zero and the n-th newest value for index N. |
EventBean |
getLastValue()
Returns the newest (last) value entered. |
java.util.Iterator<EventBean> |
iterator()
Returns all events for the group. |
int |
size()
Must return the number of events currently held, if applicable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int streamId
protected java.util.ArrayList<EventBean> events
Constructor Detail |
---|
public AggregationStateImpl(int streamId)
streamId
- stream idMethod Detail |
---|
public void clear()
AggregationState
clear
in interface AggregationState
public void applyLeave(EventBean[] eventsPerStream, ExprEvaluatorContext exprEvaluatorContext)
AggregationState
applyLeave
in interface AggregationState
eventsPerStream
- all events in all streams, typically implementations pick the relevant stream's events to removeexprEvaluatorContext
- expression eval contextpublic void applyEnter(EventBean[] eventsPerStream, ExprEvaluatorContext exprEvaluatorContext)
AggregationState
applyEnter
in interface AggregationState
eventsPerStream
- all events in all streams, typically implementations pick the relevant stream's events to addexprEvaluatorContext
- expression eval contextpublic EventBean getFirstNthValue(int index)
AggregationStateLinear
getFirstNthValue
in interface AggregationStateLinear
index
- index
public EventBean getLastNthValue(int index)
AggregationStateLinear
getLastNthValue
in interface AggregationStateLinear
index
- index
public EventBean getFirstValue()
AggregationStateLinear
getFirstValue
in interface AggregationStateLinear
public EventBean getLastValue()
AggregationStateLinear
getLastValue
in interface AggregationStateLinear
public java.util.Iterator<EventBean> iterator()
AggregationStateLinear
iterator
in interface AggregationStateLinear
public java.util.Collection<EventBean> collectionReadOnly()
AggregationStateLinear
collectionReadOnly
in interface AggregationStateLinear
public int size()
AggregationStateWithSize
size
in interface AggregationStateLinear
size
in interface AggregationStateWithSize
|
© 2006-2015 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 |