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

java.lang.Object
  extended by com.espertech.esper.epl.agg.access.AggregationStateMinMaxByEver
All Implemented Interfaces:
AggregationState, AggregationStateSorted

public class AggregationStateMinMaxByEver
extends java.lang.Object
implements AggregationState, AggregationStateSorted

Implementation of access function for single-stream (not joins).


Field Summary
protected  java.lang.Object currentMinMax
           
protected  EventBean currentMinMaxBean
           
protected  AggregationStateMinMaxByEverSpec spec
           
 
Constructor Summary
AggregationStateMinMaxByEver(AggregationStateMinMaxByEverSpec spec)
           
 
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 getFirstValue()
          Returns the first (oldest) value entered.
 EventBean getLastValue()
          Returns the newest (last) value entered.
 java.util.Iterator<EventBean> getReverseIterator()
           
 java.util.Iterator<EventBean> iterator()
          Returns all events for the group.
 int size()
          Returns the number of events in the group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

spec

protected final AggregationStateMinMaxByEverSpec spec

currentMinMaxBean

protected EventBean currentMinMaxBean

currentMinMax

protected java.lang.Object currentMinMax
Constructor Detail

AggregationStateMinMaxByEver

public AggregationStateMinMaxByEver(AggregationStateMinMaxByEverSpec spec)
Method Detail

clear

public void clear()
Description copied from interface: AggregationState
Clear all events in the group.

Specified by:
clear in interface AggregationState

applyEnter

public void applyEnter(EventBean[] eventsPerStream,
                       ExprEvaluatorContext exprEvaluatorContext)
Description copied from interface: AggregationState
Enter an event.

Specified by:
applyEnter in interface AggregationState
Parameters:
eventsPerStream - all events in all streams, typically implementations pick the relevant stream's events to add
exprEvaluatorContext - expression eval context

applyLeave

public void applyLeave(EventBean[] eventsPerStream,
                       ExprEvaluatorContext exprEvaluatorContext)
Description copied from interface: AggregationState
Remove an event.

Specified by:
applyLeave in interface AggregationState
Parameters:
eventsPerStream - all events in all streams, typically implementations pick the relevant stream's events to remove
exprEvaluatorContext - expression eval context

getFirstValue

public EventBean getFirstValue()
Description copied from interface: AggregationStateSorted
Returns the first (oldest) value entered.

Specified by:
getFirstValue in interface AggregationStateSorted
Returns:
first value

getLastValue

public EventBean getLastValue()
Description copied from interface: AggregationStateSorted
Returns the newest (last) value entered.

Specified by:
getLastValue in interface AggregationStateSorted
Returns:
last value

iterator

public java.util.Iterator<EventBean> iterator()
Description copied from interface: AggregationStateSorted
Returns all events for the group.

Specified by:
iterator in interface AggregationStateSorted
Returns:
group event iterator

getReverseIterator

public java.util.Iterator<EventBean> getReverseIterator()
Specified by:
getReverseIterator in interface AggregationStateSorted

collectionReadOnly

public java.util.Collection<EventBean> collectionReadOnly()
Description copied from interface: AggregationStateSorted
Returns all events for the group.

Specified by:
collectionReadOnly in interface AggregationStateSorted
Returns:
group event iterator

size

public int size()
Description copied from interface: AggregationStateSorted
Returns the number of events in the group.

Specified by:
size in interface AggregationStateSorted
Returns:
size

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