public class AggSvcGroupByReclaimAgedImpl extends AggregationServiceBaseGrouped
Modifier and Type | Field and Description |
---|---|
protected AggregationStateFactory[] |
accessAggregations |
protected Map<Object,AggregationMethodRowAged> |
aggregatorsPerGroup |
static long |
DEFAULT_MAX_AGE_MSEC |
protected boolean |
isJoin |
aggregators, evaluators
Constructor and Description |
---|
AggSvcGroupByReclaimAgedImpl(ExprEvaluator[] evaluators,
AggregationMethodFactory[] aggregators,
AggregationAccessorSlotPair[] accessors,
AggregationStateFactory[] accessAggregations,
boolean join,
AggSvcGroupByReclaimAgedEvalFunc evaluationFunctionMaxAge,
AggSvcGroupByReclaimAgedEvalFunc evaluationFunctionFrequency,
TimeAbacus timeAbacus) |
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).
|
void |
applyLeave(EventBean[] eventsPerStream,
Object groupByKey,
ExprEvaluatorContext exprEvaluatorContext)
Apply events as leaving a window (old events).
|
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) |
EventBean |
getEventBean(int column,
EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext context) |
Object |
getGroupKey(int agentInstanceId) |
Collection<Object> |
getGroupKeys(ExprEvaluatorContext exprEvaluatorContext) |
Object |
getValue(int column,
int agentInstanceId,
EventBean[] eventsPerStream,
boolean isNewData,
ExprEvaluatorContext exprEvaluatorContext)
Returns current aggregation state, for use by expression node representing an aggregation function.
|
protected void |
handleRemovedKeys() |
void |
internalHandleRemoved(Object key) |
void |
internalHandleUpdated(Object groupByKey,
AggregationMethodRowAged row) |
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) |
getContextPartitionAggregationService, stop
public static final long DEFAULT_MAX_AGE_MSEC
protected final AggregationStateFactory[] accessAggregations
protected final boolean isJoin
protected Map<Object,AggregationMethodRowAged> aggregatorsPerGroup
public AggSvcGroupByReclaimAgedImpl(ExprEvaluator[] evaluators, AggregationMethodFactory[] aggregators, AggregationAccessorSlotPair[] accessors, AggregationStateFactory[] accessAggregations, boolean join, AggSvcGroupByReclaimAgedEvalFunc evaluationFunctionMaxAge, AggSvcGroupByReclaimAgedEvalFunc evaluationFunctionFrequency, TimeAbacus timeAbacus)
public void clearResults(ExprEvaluatorContext exprEvaluatorContext)
AggregationService
exprEvaluatorContext
- contextpublic void applyEnter(EventBean[] eventsPerStream, Object groupByKey, ExprEvaluatorContext exprEvaluatorContext)
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
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 setCurrentAccess(Object groupByKey, int agentInstanceId, AggregationGroupByRollupLevel rollupLevel)
AggregationService
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)
AggregationResultFuture
column
- is assigned to the aggregation expression node and passed as an column (index) into a rowagentInstanceId
- the context partition ideventsPerStream
- events per streamisNewData
- new vs removed indicatorexprEvaluatorContext
- contextpublic Collection<EventBean> getCollectionOfEvents(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
public Collection<Object> getCollectionScalar(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
public EventBean getEventBean(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context)
public void setRemovedCallback(AggregationRowRemovedCallback callback)
public void internalHandleUpdated(Object groupByKey, AggregationMethodRowAged row)
public void internalHandleRemoved(Object key)
public void accept(AggregationServiceVisitor visitor)
public void acceptGroupDetail(AggregationServiceVisitorWGroupDetail visitor)
public boolean isGrouped()
protected void handleRemovedKeys()
public Object getGroupKey(int agentInstanceId)
public Collection<Object> getGroupKeys(ExprEvaluatorContext exprEvaluatorContext)