public abstract class AggSvcGroupByWTableBase extends Object implements AggregationService, AggregationServiceTable
Modifier and Type | Field and Description |
---|---|
protected AggregationRow |
currentAggregationRow |
protected Object |
currentGroupKey |
protected TableColumnMethodPairEval[] |
methodPairs |
protected TableInstanceGrouped |
tableInstance |
Constructor and Description |
---|
AggSvcGroupByWTableBase(TableInstanceGrouped tableInstance,
TableColumnMethodPairEval[] methodPairs,
AggregationMultiFunctionAgent[] accessAgents,
int[] accessColumnsZeroOffset) |
Modifier and Type | Method and Description |
---|---|
void |
accept(AggregationServiceVisitor visitor) |
void |
acceptGroupDetail(AggregationServiceVisitorWGroupDetail visitor) |
void |
applyEnter(EventBean[] eventsPerStream,
Object groupByKey,
ExprEvaluatorContext exprEvaluatorContext)
Apply events as entering a window (new events).
|
protected void |
applyEnterGroupKey(EventBean[] eventsPerStream,
Object groupByKey,
ExprEvaluatorContext exprEvaluatorContext) |
abstract void |
applyEnterInternal(EventBean[] eventsPerStream,
Object groupByKey,
ExprEvaluatorContext exprEvaluatorContext) |
void |
applyLeave(EventBean[] eventsPerStream,
Object groupByKey,
ExprEvaluatorContext exprEvaluatorContext)
Apply events as leaving a window (old events).
|
protected void |
applyLeaveGroupKey(EventBean[] eventsPerStream,
Object groupByKey,
ExprEvaluatorContext exprEvaluatorContext) |
abstract void |
applyLeaveInternal(EventBean[] eventsPerStream,
Object groupByKey,
ExprEvaluatorContext exprEvaluatorContext) |
void |
clearResults(ExprEvaluatorContext exprEvaluatorContext)
Clear current aggregation state.
|
Collection<EventBean> |
getCollectionOfEvents(int column,
EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext context) |
Collection<Object> |
getCollectionScalar(int column,
EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext context) |
AggregationService |
getContextPartitionAggregationService(int agentInstanceId) |
EventBean |
getEventBean(int column,
EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext context) |
Object |
getGroupKey(int agentInstanceId) |
Collection<Object> |
getGroupKeys(ExprEvaluatorContext exprEvaluatorContext) |
TableInstance |
getTableInstance() |
Object |
getValue(int column,
int agentInstanceId,
EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext exprEvaluatorContext) |
boolean |
isGrouped() |
void |
setCurrentAccess(Object groupByKey,
int agentInstanceId,
AggregationGroupByRollupLevel rollupLevel)
Set the current aggregation state row - for use when evaluation nodes are asked to evaluate.
|
void |
setRemovedCallback(AggregationRowRemovedCallback callback) |
void |
stop()
Stops the underlying resources.
|
protected final TableInstanceGrouped tableInstance
protected final TableColumnMethodPairEval[] methodPairs
protected AggregationRow currentAggregationRow
protected Object currentGroupKey
public AggSvcGroupByWTableBase(TableInstanceGrouped tableInstance, TableColumnMethodPairEval[] methodPairs, AggregationMultiFunctionAgent[] accessAgents, int[] accessColumnsZeroOffset)
public abstract void applyEnterInternal(EventBean[] eventsPerStream, Object groupByKey, ExprEvaluatorContext exprEvaluatorContext)
public abstract void applyLeaveInternal(EventBean[] eventsPerStream, Object groupByKey, ExprEvaluatorContext exprEvaluatorContext)
public void applyEnter(EventBean[] eventsPerStream, Object groupByKey, ExprEvaluatorContext exprEvaluatorContext)
AggregationService
applyEnter
in interface AggregationService
eventsPerStream
- - events for each stream entering windowgroupByKey
- - can be null if grouping without keys is desired, else the keys
or array of keys to use for grouping, each distinct key value results in a new row of aggregation state.exprEvaluatorContext
- context for expression evaluatiompublic void applyLeave(EventBean[] eventsPerStream, Object groupByKey, ExprEvaluatorContext exprEvaluatorContext)
AggregationService
applyLeave
in interface AggregationService
eventsPerStream
- - events for each stream entering windowgroupByKey
- - can be null if grouping without keys is desired, else the keys
or array of keys to use for grouping, each distinct key value results in a new row of aggregation state.exprEvaluatorContext
- context for expression evaluatiomprotected void applyEnterGroupKey(EventBean[] eventsPerStream, Object groupByKey, ExprEvaluatorContext exprEvaluatorContext)
protected void applyLeaveGroupKey(EventBean[] eventsPerStream, Object groupByKey, ExprEvaluatorContext exprEvaluatorContext)
public void setCurrentAccess(Object groupByKey, int agentInstanceId, AggregationGroupByRollupLevel rollupLevel)
AggregationResultFuture
setCurrentAccess
in interface AggregationResultFuture
groupByKey
- - single key identifying the row of aggregation statesagentInstanceId
- context partition idrollupLevel
- rollup levelpublic Object getValue(int column, int agentInstanceId, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext)
getValue
in interface AggregationResultFuture
public Collection<EventBean> getCollectionOfEvents(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
getCollectionOfEvents
in interface AggregationResultFuture
public Collection<Object> getCollectionScalar(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
getCollectionScalar
in interface AggregationResultFuture
public EventBean getEventBean(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
getEventBean
in interface AggregationResultFuture
public void setRemovedCallback(AggregationRowRemovedCallback callback)
setRemovedCallback
in interface AggregationService
public void accept(AggregationServiceVisitor visitor)
accept
in interface AggregationService
public void acceptGroupDetail(AggregationServiceVisitorWGroupDetail visitor)
acceptGroupDetail
in interface AggregationService
public boolean isGrouped()
isGrouped
in interface AggregationService
public Object getGroupKey(int agentInstanceId)
getGroupKey
in interface AggregationResultFuture
public Collection<Object> getGroupKeys(ExprEvaluatorContext exprEvaluatorContext)
getGroupKeys
in interface AggregationResultFuture
public void clearResults(ExprEvaluatorContext exprEvaluatorContext)
AggregationService
clearResults
in interface AggregationService
exprEvaluatorContext
- contextpublic void stop()
StopCallback
stop
in interface StopCallback
public AggregationService getContextPartitionAggregationService(int agentInstanceId)
getContextPartitionAggregationService
in interface AggregationResultFuture
public TableInstance getTableInstance()
getTableInstance
in interface AggregationServiceTable
Copyright © 2005–2018. All rights reserved.