public class AggregationStateLinearJoinImpl extends Object implements AggregationStateWithSize, AggregationStateLinear
Modifier and Type | Field and Description |
---|---|
protected LinkedHashMap<EventBean,Integer> |
refSet |
protected int |
streamId |
Constructor and Description |
---|
AggregationStateLinearJoinImpl(int streamId)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addEvent(EventBean theEvent) |
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.
|
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.
|
LinkedHashMap<EventBean,Integer> |
getRefSet() |
Iterator<EventBean> |
iterator()
Returns all events for the group.
|
protected void |
removeEvent(EventBean theEvent) |
int |
size()
Must return the number of events currently held, if applicable.
|
protected int streamId
protected LinkedHashMap<EventBean,Integer> refSet
public AggregationStateLinearJoinImpl(int streamId)
streamId
- stream idpublic void clear()
AggregationState
clear
in interface AggregationState
public 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 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 EventBean getFirstNthValue(int index)
AggregationStateLinear
getFirstNthValue
in interface AggregationStateLinear
index
- indexpublic EventBean getLastNthValue(int index)
AggregationStateLinear
getLastNthValue
in interface AggregationStateLinear
index
- indexpublic EventBean getFirstValue()
AggregationStateLinear
getFirstValue
in interface AggregationStateLinear
public EventBean getLastValue()
AggregationStateLinear
getLastValue
in interface AggregationStateLinear
public Iterator<EventBean> iterator()
AggregationStateLinear
iterator
in interface AggregationStateLinear
public Collection<EventBean> collectionReadOnly()
AggregationStateLinear
collectionReadOnly
in interface AggregationStateLinear
public int size()
AggregationStateWithSize
size
in interface AggregationStateLinear
size
in interface AggregationStateWithSize
public LinkedHashMap<EventBean,Integer> getRefSet()
protected void addEvent(EventBean theEvent)
protected void removeEvent(EventBean theEvent)