本文整理汇总了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);
}
}
示例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);
}
示例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);
}
}