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


Java HookType.INTERNAL_QUERY_PLAN属性代码示例

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


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

示例1: getHook

public static QueryPlanIndexHook getHook(Annotation[] annotations, EngineImportService engineImportService) {
    try {
        return (QueryPlanIndexHook) EngineImportUtil.getAnnotationHook(annotations, HookType.INTERNAL_QUERY_PLAN, QueryPlanIndexHook.class, engineImportService);
    } catch (ExprValidationException e) {
        throw new EPException("Failed to obtain hook for " + HookType.INTERNAL_QUERY_PLAN);
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:7,代码来源:QueryPlanIndexHookUtil.java

示例2: analyzeValidateGroupBy

private static GroupByRollupInfo analyzeValidateGroupBy(GroupByClauseExpressions groupBy, ExprValidationContext validationContext)
        throws ExprValidationException {
    if (groupBy == null) {
        return null;
    }

    // validate that group-by expressions are somewhat-plain expressions
    ExprNodeUtilityRich.validateNoSpecialsGroupByExpressions(groupBy.getGroupByNodes());

    // validate each expression
    ExprNode[] validated = new ExprNode[groupBy.getGroupByNodes().length];
    for (int i = 0; i < validated.length; i++) {
        validated[i] = ExprNodeUtilityRich.getValidatedSubtree(ExprNodeOrigin.GROUPBY, groupBy.getGroupByNodes()[i], validationContext);
    }

    if (groupBy.getGroupByRollupLevels() == null) {
        return new GroupByRollupInfo(validated, null);
    }

    AggregationGroupByRollupDesc rollup = AggregationGroupByRollupDesc.make(groupBy.getGroupByRollupLevels());

    // callback when hook reporting enabled
    try {
        GroupByRollupPlanHook hook = (GroupByRollupPlanHook) EngineImportUtil.getAnnotationHook(validationContext.getAnnotations(), HookType.INTERNAL_GROUPROLLUP_PLAN, GroupByRollupPlanHook.class, validationContext.getEngineImportService());
        if (hook != null) {
            hook.query(new GroupByRollupPlanDesc(validated, rollup));
        }
    } catch (ExprValidationException e) {
        throw new EPException("Failed to obtain hook for " + HookType.INTERNAL_QUERY_PLAN);
    }

    return new GroupByRollupInfo(validated, rollup);
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:33,代码来源:ResultSetProcessorFactoryFactory.java

示例3: getHook

public static QueryPlanIndexHook getHook(Annotation[] annotations) {
    try {
        return (QueryPlanIndexHook) JavaClassHelper.getAnnotationHook(annotations, HookType.INTERNAL_QUERY_PLAN, QueryPlanIndexHook.class, null);
    }
    catch (ExprValidationException e) {
        throw new EPException("Failed to obtain hook for " + HookType.INTERNAL_QUERY_PLAN);
    }
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:8,代码来源:QueryPlanIndexHookUtil.java


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