当前位置: 首页>>代码示例>>Java>>正文


Java AggregationAccessorSlotPair类代码示例

本文整理汇总了Java中com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair的典型用法代码示例。如果您正苦于以下问题:Java AggregationAccessorSlotPair类的具体用法?Java AggregationAccessorSlotPair怎么用?Java AggregationAccessorSlotPair使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AggregationAccessorSlotPair类属于com.espertech.esper.epl.agg.access包,在下文中一共展示了AggregationAccessorSlotPair类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: AggSvcGroupByRollupImpl

import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair; //导入依赖的package包/类
/**
 * Ctor.
 *
 * @param evaluators          - evaluate the sub-expression within the aggregate function (ie. sum(4*myNum))
 * @param prototypes          - collect the aggregation state that evaluators evaluate to, act as prototypes for new aggregations
 *                            aggregation states for each group
 * @param accessors           accessor definitions
 * @param accessAggregations  access aggs
 * @param isJoin              true for join, false for single-stream
 * @param rollupLevelDesc     rollup info
 * @param topGroupAggregators methodFactories for top group
 * @param topGroupStates      states for top group
 */
public AggSvcGroupByRollupImpl(ExprEvaluator[] evaluators,
                               AggregationMethodFactory[] prototypes,
                               AggregationAccessorSlotPair[] accessors,
                               AggregationStateFactory[] accessAggregations,
                               boolean isJoin,
                               AggregationGroupByRollupDesc rollupLevelDesc,
                               AggregationMethod[] topGroupAggregators,
                               AggregationState[] topGroupStates) {
    super(evaluators, prototypes);

    this.aggregatorsPerGroup = (Map<Object, AggregationMethodPairRow>[]) new Map[rollupLevelDesc.getNumLevelsAggregation()];
    this.removedKeys = (List<Object>[]) new ArrayList[rollupLevelDesc.getNumLevelsAggregation()];
    for (int i = 0; i < rollupLevelDesc.getNumLevelsAggregation(); i++) {
        this.aggregatorsPerGroup[i] = new HashMap<Object, AggregationMethodPairRow>();
        this.removedKeys[i] = new ArrayList<Object>(2);
    }
    this.accessors = accessors;
    this.accessAggregations = accessAggregations;
    this.isJoin = isJoin;
    this.rollupLevelDesc = rollupLevelDesc;
    this.aggregatorTopGroup = new AggregationMethodPairRow(0, topGroupAggregators, topGroupStates);
    this.methodParameterValues = new Object[evaluators.length];
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:37,代码来源:AggSvcGroupByRollupImpl.java

示例2: toEvaluators

import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair; //导入依赖的package包/类
public AggregationLocalGroupByPlan toEvaluators(StatementContext stmtContext, boolean isFireAndForget) {
    AggregationLocalGroupByColumn[] columns = new AggregationLocalGroupByColumn[columnsForges.length];
    for (int i = 0; i < columns.length; i++) {
        AggregationLocalGroupByColumnForge forge = columnsForges[i];
        ExprEvaluator[] evaluators = ExprNodeUtilityRich.getEvaluatorsMayCompile(forge.getPartitionForges(), stmtContext.getEngineImportService(), AggSvcLocalGroupByForge.class, isFireAndForget, stmtContext.getStatementName());
        AggregationAccessorSlotPair pair = forge.getPair() == null ? null : AggregatorUtil.getAccessorForForge(forge.getPair(), stmtContext.getEngineImportService(), isFireAndForget, stmtContext.getStatementName());
        columns[i] = new AggregationLocalGroupByColumn(forge.isDefaultGroupLevel(), evaluators, forge.getMethodOffset(), forge.isMethodAgg(), pair, forge.getLevelNum());
    }

    AggregationLocalGroupByLevel optionalLevelTop = optionalLevelTopForge == null ? null : makeLevel(optionalLevelTopForge, stmtContext, isFireAndForget);
    AggregationLocalGroupByLevel[] allLevels = new AggregationLocalGroupByLevel[allLevelsForges.length];
    for (int i = 0; i < allLevels.length; i++) {
        allLevels[i] = makeLevel(allLevelsForges[i], stmtContext, isFireAndForget);
    }

    return new AggregationLocalGroupByPlan(numMethods, numAccess, columns, optionalLevelTop, allLevels);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:18,代码来源:AggregationLocalGroupByPlanForge.java

示例3: evalMap

import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair; //导入依赖的package包/类
protected static Map<String, Object> evalMap(ObjectArrayBackedEventBean event, AggregationRowPair row, Map<String, TableMetadataColumn> items, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext) {
    HashMap<String, Object> cols = new HashMap<String, Object>();
    for (Map.Entry<String, TableMetadataColumn> entry : items.entrySet()) {
        if (entry.getValue() instanceof TableMetadataColumnPlain) {
            TableMetadataColumnPlain plain = (TableMetadataColumnPlain) entry.getValue();
            cols.put(entry.getKey(), event.getProperties()[plain.getIndexPlain()]);
        } else {
            TableMetadataColumnAggregation aggcol = (TableMetadataColumnAggregation) entry.getValue();
            if (!aggcol.getFactory().isAccessAggregation()) {
                cols.put(entry.getKey(), row.getMethods()[aggcol.getMethodOffset()].getValue());
            } else {
                AggregationAccessorSlotPair pair = aggcol.getAccessAccessorSlotPair();
                Object value = pair.getAccessor().getValue(row.getStates()[pair.getSlot()], eventsPerStream, isNewData, exprEvaluatorContext);
                cols.put(entry.getKey(), value);
            }
        }
    }
    return cols;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:20,代码来源:ExprTableEvalStrategyUtil.java

示例4: evalTypable

import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair; //导入依赖的package包/类
protected static Object[] evalTypable(ObjectArrayBackedEventBean event,
                                      AggregationRowPair row,
                                      Map<String, TableMetadataColumn> items,
                                      EventBean[] eventsPerStream,
                                      boolean isNewData,
                                      ExprEvaluatorContext exprEvaluatorContext) {
    Object[] values = new Object[items.size()];
    int count = 0;
    for (Map.Entry<String, TableMetadataColumn> entry : items.entrySet()) {
        if (entry.getValue() instanceof TableMetadataColumnPlain) {
            TableMetadataColumnPlain plain = (TableMetadataColumnPlain) entry.getValue();
            values[count] = event.getProperties()[plain.getIndexPlain()];
        } else {
            TableMetadataColumnAggregation aggcol = (TableMetadataColumnAggregation) entry.getValue();
            if (!aggcol.getFactory().isAccessAggregation()) {
                values[count] = row.getMethods()[aggcol.getMethodOffset()].getValue();
            } else {
                AggregationAccessorSlotPair pair = aggcol.getAccessAccessorSlotPair();
                values[count] = pair.getAccessor().getValue(row.getStates()[pair.getSlot()], eventsPerStream, isNewData, exprEvaluatorContext);
            }
        }
        count++;
    }
    return values;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:26,代码来源:ExprTableEvalStrategyUtil.java

示例5: AggSvcGroupByRefcountedWAccessImpl

import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair; //导入依赖的package包/类
/**
 * Ctor.
 * @param evaluators - evaluate the sub-expression within the aggregate function (ie. sum(4*myNum))
 * @param prototypes - collect the aggregation state that evaluators evaluate to, act as prototypes for new aggregations
 * aggregation states for each group
 * @param methodResolutionService - factory for creating additional aggregation method instances per group key
 * @param accessors accessor definitions
 * @param streams streams in join
 * @param isJoin true for join, false for single-stream
 */
public AggSvcGroupByRefcountedWAccessImpl(ExprEvaluator evaluators[],
                                   AggregationMethodFactory prototypes[],
                                   MethodResolutionService methodResolutionService,
                                   AggregationAccessorSlotPair[] accessors,
                                   int[] streams,
                                   boolean isJoin)
{
    super(evaluators, prototypes);
    this.methodResolutionService = methodResolutionService;
    this.aggregatorsPerGroup = new HashMap<Object, AggregationMethodPairRow>();
    this.accessors = accessors;
    this.streams = streams;
    this.isJoin = isJoin;
    removedKeys = new ArrayList<Object>();
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:26,代码来源:AggSvcGroupByRefcountedWAccessImpl.java

示例6: getValue

import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair; //导入依赖的package包/类
public Object getValue(int column, int agentInstanceId, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext) {
    if (column < aggregators.length) {
        return aggregators[column].getValue();
    } else {
        AggregationAccessorSlotPair pair = factory.accessors[column - aggregators.length];
        return pair.getAccessor().getValue(states[pair.getSlot()], eventsPerStream, isNewData, exprEvaluatorContext);
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:9,代码来源:AggSvcGroupAllImplMixedAccess.java

示例7: getCollectionOfEvents

import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair; //导入依赖的package包/类
public Collection<EventBean> getCollectionOfEvents(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) {
    if (column < aggregators.length) {
        return null;
    } else {
        AggregationAccessorSlotPair pair = factory.accessors[column - aggregators.length];
        return pair.getAccessor().getEnumerableEvents(states[pair.getSlot()], eventsPerStream, isNewData, context);
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:9,代码来源:AggSvcGroupAllImplMixedAccess.java

示例8: getCollectionScalar

import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair; //导入依赖的package包/类
public Collection<Object> getCollectionScalar(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) {
    if (column < aggregators.length) {
        return null;
    } else {
        AggregationAccessorSlotPair pair = factory.accessors[column - aggregators.length];
        return pair.getAccessor().getEnumerableScalar(states[pair.getSlot()], eventsPerStream, isNewData, context);
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:9,代码来源:AggSvcGroupAllImplMixedAccess.java

示例9: getEventBean

import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair; //导入依赖的package包/类
public EventBean getEventBean(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) {
    if (column < aggregators.length) {
        return null;
    } else {
        AggregationAccessorSlotPair pair = factory.accessors[column - aggregators.length];
        return pair.getAccessor().getEnumerableEvent(states[pair.getSlot()], eventsPerStream, isNewData, context);
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:9,代码来源:AggSvcGroupAllImplMixedAccess.java

示例10: AggSvcGroupByNoReclaimMixedAccessImpl

import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair; //导入依赖的package包/类
/**
 * Ctor.
 *
 * @param evaluators         - evaluate the sub-expression within the aggregate function (ie. sum(4*myNum))
 * @param prototypes         - collect the aggregation state that evaluators evaluate to, act as prototypes for new aggregations
 *                           aggregation states for each group
 * @param accessorsFactory   accessor definitions
 * @param accessAggregations access aggs
 * @param isJoin             true for join, false for single-stream
 */
public AggSvcGroupByNoReclaimMixedAccessImpl(ExprEvaluator[] evaluators,
                                             AggregationMethodFactory[] prototypes,
                                             AggregationAccessorSlotPair[] accessorsFactory,
                                             AggregationStateFactory[] accessAggregations,
                                             boolean isJoin) {
    super(evaluators, prototypes);
    this.accessorsFactory = accessorsFactory;
    this.accessAggregations = accessAggregations;
    this.isJoin = isJoin;
    this.aggregatorsPerGroup = new HashMap<Object, AggregationRowPair>();
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:22,代码来源:AggSvcGroupByNoReclaimMixedAccessImpl.java

示例11: getValue

import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair; //导入依赖的package包/类
public Object getValue(int column, int agentInstanceId, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext exprEvaluatorContext) {
    if (column < aggregators.length) {
        return currentAggregatorRow.getMethods()[column].getValue();
    } else {
        AggregationAccessorSlotPair pair = accessorsFactory[column - aggregators.length];
        return pair.getAccessor().getValue(currentAggregatorRow.getStates()[pair.getSlot()], eventsPerStream, isNewData, exprEvaluatorContext);
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:9,代码来源:AggSvcGroupByNoReclaimMixedAccessImpl.java

示例12: getCollectionOfEvents

import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair; //导入依赖的package包/类
public Collection<EventBean> getCollectionOfEvents(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) {
    if (column < aggregators.length) {
        return null;
    } else {
        AggregationAccessorSlotPair pair = accessorsFactory[column - aggregators.length];
        return pair.getAccessor().getEnumerableEvents(currentAggregatorRow.getStates()[pair.getSlot()], eventsPerStream, isNewData, context);
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:9,代码来源:AggSvcGroupByNoReclaimMixedAccessImpl.java

示例13: getCollectionScalar

import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair; //导入依赖的package包/类
public Collection<Object> getCollectionScalar(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) {
    if (column < aggregators.length) {
        return null;
    } else {
        AggregationAccessorSlotPair pair = accessorsFactory[column - aggregators.length];
        return pair.getAccessor().getEnumerableScalar(currentAggregatorRow.getStates()[pair.getSlot()], eventsPerStream, isNewData, context);
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:9,代码来源:AggSvcGroupByNoReclaimMixedAccessImpl.java

示例14: getEventBean

import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair; //导入依赖的package包/类
public EventBean getEventBean(int column, EventBean[] eventsPerStream, boolean isNewData, ExprEvaluatorContext context) {
    if (column < aggregators.length) {
        return null;
    } else {
        AggregationAccessorSlotPair pair = accessorsFactory[column - aggregators.length];
        return pair.getAccessor().getEnumerableEvent(currentAggregatorRow.getStates()[pair.getSlot()], eventsPerStream, isNewData, context);
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:9,代码来源:AggSvcGroupByNoReclaimMixedAccessImpl.java

示例15: AggSvcGroupByRefcountedWAccessImpl

import com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair; //导入依赖的package包/类
/**
 * Ctor.
 *
 * @param evaluators         - evaluate the sub-expression within the aggregate function (ie. sum(4*myNum))
 * @param prototypes         - collect the aggregation state that evaluators evaluate to, act as prototypes for new aggregations
 *                           aggregation states for each group
 * @param accessors          accessor definitions
 * @param accessAggregations access aggs
 * @param isJoin             true for join, false for single-stream
 */
public AggSvcGroupByRefcountedWAccessImpl(ExprEvaluator[] evaluators,
                                          AggregationMethodFactory[] prototypes,
                                          AggregationAccessorSlotPair[] accessors,
                                          AggregationStateFactory[] accessAggregations,
                                          boolean isJoin) {
    super(evaluators, prototypes);
    this.aggregatorsPerGroup = new HashMap<>();
    this.accessors = accessors;
    this.accessAggregations = accessAggregations;
    this.isJoin = isJoin;
    removedKeys = new ArrayList<>();
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:23,代码来源:AggSvcGroupByRefcountedWAccessImpl.java


注:本文中的com.espertech.esper.epl.agg.access.AggregationAccessorSlotPair类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。