public class AggregationStateLinearJoinImpl extends java.lang.Object implements AggregationStateWithSize, AggregationStateLinear
Modifier and Type | Field and Description |
---|---|
protected java.util.LinkedHashMap<EventBean,java.lang.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.
|
static void |
applyEnterCodegen(AggregationStateLinearForge forge,
int stateNumber,
CodegenMethodNode method,
ExprForgeCodegenSymbol symbols,
CodegenClassScope classScope) |
void |
applyLeave(EventBean[] eventsPerStream,
ExprEvaluatorContext exprEvaluatorContext)
Remove an event.
|
static void |
applyLeaveCodegen(AggregationStateLinearForge forge,
int stateNumber,
CodegenMethodNode method,
ExprForgeCodegenSymbol symbols,
CodegenClassScope classScope) |
void |
clear()
Clear all events in the group.
|
static void |
clearCodegen(int stateNumber,
CodegenMethodNode method) |
static CodegenExpression |
codegenGetFirstValue(int slot,
CodegenClassScope classScope,
CodegenMethodNode parentMethod) |
static CodegenExpression |
codegenGetLastValue(int slot,
CodegenClassScope classScope,
CodegenMethodNode parentMethod,
CodegenNamedMethods namedMethods) |
java.util.Collection<EventBean> |
collectionReadOnly()
Returns all events for the group.
|
static CodegenExpression |
collectionReadOnlyCodegen(int column,
CodegenMethodNode parentMethod,
CodegenClassScope classScope,
CodegenNamedMethods namedMethods) |
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.
|
static CodegenExpression |
getFirstNthValueCodegen(CodegenExpressionRef index,
int slot,
CodegenClassScope classScope,
CodegenMethodNode parentMethod,
CodegenNamedMethods namedMethods) |
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.
|
static CodegenExpression |
getLastNthValueCodegen(CodegenExpressionRef index,
int slot,
CodegenClassScope classScope,
CodegenMethodNode parentMethod,
CodegenNamedMethods namedMethods) |
EventBean |
getLastValue()
Returns the newest (last) value entered.
|
java.util.LinkedHashMap<EventBean,java.lang.Integer> |
getRefSet() |
java.util.Iterator<EventBean> |
iterator()
Returns all events for the group.
|
static CodegenExpression |
iteratorCodegen(int slot,
CodegenClassScope classScope,
CodegenMethodNode parentMethod,
CodegenNamedMethods namedMethods) |
protected void |
removeEvent(EventBean theEvent) |
static void |
rowMemberCodegen(int stateNumber,
CodegenCtor ctor,
CodegenMembersColumnized membersColumnized) |
int |
size()
Must return the number of events currently held, if applicable.
|
static CodegenExpression |
sizeCodegen(AggregationStateLinearForge forge,
int slot) |
protected int streamId
protected java.util.LinkedHashMap<EventBean,java.lang.Integer> refSet
public AggregationStateLinearJoinImpl(int streamId)
streamId
- stream idpublic static void rowMemberCodegen(int stateNumber, CodegenCtor ctor, CodegenMembersColumnized membersColumnized)
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 static void applyEnterCodegen(AggregationStateLinearForge forge, int stateNumber, CodegenMethodNode method, ExprForgeCodegenSymbol symbols, CodegenClassScope classScope)
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 static void applyLeaveCodegen(AggregationStateLinearForge forge, int stateNumber, CodegenMethodNode method, ExprForgeCodegenSymbol symbols, CodegenClassScope classScope)
public void clear()
AggregationState
clear
in interface AggregationState
public static void clearCodegen(int stateNumber, CodegenMethodNode method)
public EventBean getFirstNthValue(int index)
AggregationStateLinear
getFirstNthValue
in interface AggregationStateLinear
index
- indexpublic static CodegenExpression getFirstNthValueCodegen(CodegenExpressionRef index, int slot, CodegenClassScope classScope, CodegenMethodNode parentMethod, CodegenNamedMethods namedMethods)
public EventBean getLastNthValue(int index)
AggregationStateLinear
getLastNthValue
in interface AggregationStateLinear
index
- indexpublic static CodegenExpression getLastNthValueCodegen(CodegenExpressionRef index, int slot, CodegenClassScope classScope, CodegenMethodNode parentMethod, CodegenNamedMethods namedMethods)
public EventBean getFirstValue()
AggregationStateLinear
getFirstValue
in interface AggregationStateLinear
public static CodegenExpression codegenGetFirstValue(int slot, CodegenClassScope classScope, CodegenMethodNode parentMethod)
public EventBean getLastValue()
AggregationStateLinear
getLastValue
in interface AggregationStateLinear
public static CodegenExpression codegenGetLastValue(int slot, CodegenClassScope classScope, CodegenMethodNode parentMethod, CodegenNamedMethods namedMethods)
public java.util.Iterator<EventBean> iterator()
AggregationStateLinear
iterator
in interface AggregationStateLinear
public static CodegenExpression iteratorCodegen(int slot, CodegenClassScope classScope, CodegenMethodNode parentMethod, CodegenNamedMethods namedMethods)
public java.util.Collection<EventBean> collectionReadOnly()
AggregationStateLinear
collectionReadOnly
in interface AggregationStateLinear
public static CodegenExpression collectionReadOnlyCodegen(int column, CodegenMethodNode parentMethod, CodegenClassScope classScope, CodegenNamedMethods namedMethods)
public int size()
AggregationStateWithSize
size
in interface AggregationStateLinear
size
in interface AggregationStateWithSize
public static CodegenExpression sizeCodegen(AggregationStateLinearForge forge, int slot)
public java.util.LinkedHashMap<EventBean,java.lang.Integer> getRefSet()
protected void addEvent(EventBean theEvent)
protected void removeEvent(EventBean theEvent)