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


Java OutputLimitSpec.getDisplayLimit方法代码示例

本文整理汇总了Java中com.espertech.esper.epl.spec.OutputLimitSpec.getDisplayLimit方法的典型用法代码示例。如果您正苦于以下问题:Java OutputLimitSpec.getDisplayLimit方法的具体用法?Java OutputLimitSpec.getDisplayLimit怎么用?Java OutputLimitSpec.getDisplayLimit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.espertech.esper.epl.spec.OutputLimitSpec的用法示例。


在下文中一共展示了OutputLimitSpec.getDisplayLimit方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ResultSetProcessorRowPerGroupFactory

import com.espertech.esper.epl.spec.OutputLimitSpec; //导入方法依赖的package包/类
/**
 * Ctor.
 * @param selectExprProcessor - for processing the select expression and generting the final output rows
 * @param groupKeyNodes - list of group-by expression nodes needed for building the group-by keys
 * @param optionalHavingNode - expression node representing validated HAVING clause, or null if none given.
 * Aggregation functions in the having node must have been pointed to the AggregationService for evaluation.
 * @param isSelectRStream - true if remove stream events should be generated
 * @param isUnidirectional - true if unidirectional join
 */
public ResultSetProcessorRowPerGroupFactory(SelectExprProcessor selectExprProcessor,
                                            ExprEvaluator[] groupKeyNodes,
                                            ExprEvaluator optionalHavingNode,
                                            boolean isSelectRStream,
                                            boolean isUnidirectional,
                                            OutputLimitSpec outputLimitSpec,
                                            boolean isSorting,
                                            boolean noDataWindowSingleStream)
{
    this.selectExprProcessor = selectExprProcessor;
    this.groupKeyNodes = groupKeyNodes;
    if (groupKeyNodes.length == 1) {
        this.groupKeyNode = groupKeyNodes[0];
    }
    else {
        this.groupKeyNode = null;
    }
    this.optionalHavingNode = optionalHavingNode;
    this.isSorting = isSorting;
    this.isSelectRStream = isSelectRStream;
    this.isUnidirectional = isUnidirectional;
    this.outputLimitSpec = outputLimitSpec;
    this.noDataWindowSingleSnapshot = (outputLimitSpec != null && outputLimitSpec.getDisplayLimit() == OutputLimitLimitType.SNAPSHOT && noDataWindowSingleStream);
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:34,代码来源:ResultSetProcessorRowPerGroupFactory.java

示例2: ResultSetProcessorRowPerGroupForge

import com.espertech.esper.epl.spec.OutputLimitSpec; //导入方法依赖的package包/类
public ResultSetProcessorRowPerGroupForge(EventType resultEventType,
                                          SelectExprProcessorForge selectExprProcessorForge,
                                          ExprNode[] groupKeyNodeExpressions,
                                          ExprForge optionalHavingNode,
                                          boolean isSelectRStream,
                                          boolean isUnidirectional,
                                          OutputLimitSpec outputLimitSpec,
                                          boolean isSorting,
                                          boolean noDataWindowSingleStream,
                                          boolean isHistoricalOnly,
                                          boolean iterateUnbounded,
                                          ResultSetProcessorHelperFactory resultSetProcessorHelperFactory,
                                          ResultSetProcessorOutputConditionType outputConditionType,
                                          int numStreams,
                                          OutputConditionPolledFactory optionalOutputFirstConditionFactory) {
    this.resultEventType = resultEventType;
    this.groupKeyNodeExpressions = groupKeyNodeExpressions;
    this.selectExprProcessorForge = selectExprProcessorForge;
    this.optionalHavingNode = optionalHavingNode;
    this.isSorting = isSorting;
    this.isSelectRStream = isSelectRStream;
    this.isUnidirectional = isUnidirectional;
    this.outputLimitSpec = outputLimitSpec;
    boolean noDataWindowSingleSnapshot = iterateUnbounded || (outputLimitSpec != null && outputLimitSpec.getDisplayLimit() == OutputLimitLimitType.SNAPSHOT && noDataWindowSingleStream);
    this.unboundedProcessor = noDataWindowSingleSnapshot && !isHistoricalOnly;
    this.isHistoricalOnly = isHistoricalOnly;
    this.resultSetProcessorHelperFactory = resultSetProcessorHelperFactory;
    this.outputConditionType = outputConditionType;
    this.numStreams = numStreams;
    this.optionalOutputFirstConditionFactory = optionalOutputFirstConditionFactory;
    this.groupKeyTypes = ExprNodeUtilityCore.getExprResultTypes(groupKeyNodeExpressions);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:33,代码来源:ResultSetProcessorRowPerGroupForge.java

示例3: ResultSetProcessorRowPerGroupRollupForge

import com.espertech.esper.epl.spec.OutputLimitSpec; //导入方法依赖的package包/类
public ResultSetProcessorRowPerGroupRollupForge(EventType resultEventType,
                                                GroupByRollupPerLevelForge perLevelForges,
                                                ExprNode[] groupKeyNodeExpressions,
                                                boolean isSelectRStream,
                                                boolean isUnidirectional,
                                                OutputLimitSpec outputLimitSpec,
                                                boolean isSorting,
                                                boolean noDataWindowSingleStream,
                                                AggregationGroupByRollupDesc groupByRollupDesc,
                                                boolean isJoin,
                                                boolean isHistoricalOnly,
                                                boolean iterateUnbounded,
                                                OutputConditionPolledFactory optionalOutputFirstConditionFactory,
                                                ResultSetProcessorHelperFactory resultSetProcessorHelperFactory,
                                                ResultSetProcessorOutputConditionType outputConditionType,
                                                int numStreams) {
    this.resultEventType = resultEventType;
    this.groupKeyNodeExpressions = groupKeyNodeExpressions;
    this.perLevelForges = perLevelForges;
    this.isSorting = isSorting;
    this.isSelectRStream = isSelectRStream;
    this.isUnidirectional = isUnidirectional;
    this.outputLimitSpec = outputLimitSpec;
    boolean noDataWindowSingleSnapshot = iterateUnbounded || (outputLimitSpec != null && outputLimitSpec.getDisplayLimit() == OutputLimitLimitType.SNAPSHOT && noDataWindowSingleStream);
    this.unbounded = noDataWindowSingleSnapshot && !isHistoricalOnly;
    this.groupByRollupDesc = groupByRollupDesc;
    this.isJoin = isJoin;
    this.isHistoricalOnly = isHistoricalOnly;
    this.optionalOutputFirstConditionFactory = optionalOutputFirstConditionFactory;
    this.resultSetProcessorHelperFactory = resultSetProcessorHelperFactory;
    this.outputConditionType = outputConditionType;
    this.numStreams = numStreams;
    this.groupKeyTypes = ExprNodeUtilityCore.getExprResultTypes(groupKeyNodeExpressions);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:35,代码来源:ResultSetProcessorRowPerGroupRollupForge.java

示例4: createCondition

import com.espertech.esper.epl.spec.OutputLimitSpec; //导入方法依赖的package包/类
public static OutputConditionFactory createCondition(OutputLimitSpec outputLimitSpec,
                                                     StatementContext statementContext,
                                                     boolean isGrouped,
                                                     boolean isWithHavingClause,
                                                     boolean isStartConditionOnCreation,
                                                     ResultSetProcessorHelperFactory resultSetProcessorHelperFactory)
        throws ExprValidationException {
    if (outputLimitSpec == null) {
        return new OutputConditionNullFactory();
    }

    // Check if a variable is present
    VariableMetaData variableMetaData = null;
    if (outputLimitSpec.getVariableName() != null) {
        variableMetaData = statementContext.getVariableService().getVariableMetaData(outputLimitSpec.getVariableName());
        if (variableMetaData == null) {
            throw new ExprValidationException("Variable named '" + outputLimitSpec.getVariableName() + "' has not been declared");
        }
        String message = VariableServiceUtil.checkVariableContextName(statementContext.getContextDescriptor(), variableMetaData);
        if (message != null) {
            throw new ExprValidationException(message);
        }
    }

    if (outputLimitSpec.getDisplayLimit() == OutputLimitLimitType.FIRST && isGrouped) {
        return new OutputConditionNullFactory();
    }

    if (outputLimitSpec.getRateType() == OutputLimitRateType.CRONTAB) {
        return resultSetProcessorHelperFactory.makeOutputConditionCrontab(outputLimitSpec.getCrontabAtSchedule(), statementContext, isStartConditionOnCreation);
    } else if (outputLimitSpec.getRateType() == OutputLimitRateType.WHEN_EXPRESSION) {
        return resultSetProcessorHelperFactory.makeOutputConditionExpression(outputLimitSpec.getWhenExpressionNode(), outputLimitSpec.getThenExpressions(), statementContext, outputLimitSpec.getAndAfterTerminateExpr(), outputLimitSpec.getAndAfterTerminateThenExpressions(), isStartConditionOnCreation);
    } else if (outputLimitSpec.getRateType() == OutputLimitRateType.EVENTS) {
        if (log.isDebugEnabled()) {
            log.debug(".createCondition creating OutputConditionCount with event rate " + outputLimitSpec);
        }

        if ((variableMetaData != null) && (!JavaClassHelper.isNumericNonFP(variableMetaData.getType()))) {
            throw new IllegalArgumentException("Variable named '" + outputLimitSpec.getVariableName() + "' must be type integer, long or short");
        }

        int rate = -1;
        if (outputLimitSpec.getRate() != null) {
            rate = outputLimitSpec.getRate().intValue();
        }
        return resultSetProcessorHelperFactory.makeOutputConditionCount(rate, variableMetaData, statementContext);
    } else if (outputLimitSpec.getRateType() == OutputLimitRateType.TERM) {
        if (outputLimitSpec.getAndAfterTerminateExpr() == null && (outputLimitSpec.getAndAfterTerminateThenExpressions() == null || outputLimitSpec.getAndAfterTerminateThenExpressions().isEmpty())) {
            return new OutputConditionTermFactory();
        } else {
            return resultSetProcessorHelperFactory.makeOutputConditionExpression(new ExprConstantNodeImpl(false), Collections.<OnTriggerSetAssignment>emptyList(), statementContext, outputLimitSpec.getAndAfterTerminateExpr(), outputLimitSpec.getAndAfterTerminateThenExpressions(), isStartConditionOnCreation);
        }
    } else {
        if (log.isDebugEnabled()) {
            log.debug(".createCondition creating OutputConditionTime with interval length " + outputLimitSpec.getRate());
        }
        if ((variableMetaData != null) && (!JavaClassHelper.isNumeric(variableMetaData.getType()))) {
            throw new IllegalArgumentException("Variable named '" + outputLimitSpec.getVariableName() + "' must be of numeric type");
        }

        return resultSetProcessorHelperFactory.makeOutputConditionTime(outputLimitSpec.getTimePeriodExpr(), isStartConditionOnCreation);
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:64,代码来源:OutputConditionFactoryFactory.java


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