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


Java HookType类代码示例

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


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

示例1: getHook

import com.espertech.esper.client.annotation.HookType; //导入依赖的package包/类
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,代码行数:8,代码来源:QueryPlanIndexHookUtil.java

示例2: analyzeValidateGroupBy

import com.espertech.esper.client.annotation.HookType; //导入依赖的package包/类
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,代码行数:34,代码来源:ResultSetProcessorFactoryFactory.java

示例3: getHook

import com.espertech.esper.client.annotation.HookType; //导入依赖的package包/类
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,代码行数:9,代码来源:QueryPlanIndexHookUtil.java


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