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


Java QueryPlanIndexHookUtil类代码示例

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


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

示例1: queryPlanReport

import com.espertech.esper.epl.join.util.QueryPlanIndexHookUtil; //导入依赖的package包/类
private static void queryPlanReport(String indexNameOrNull, EventTable eventTableOrNull, Annotation[] annotations, AgentInstanceContext agentInstanceContext, boolean queryPlanLogging, Logger queryPlanLogDestination, String objectName) {
    QueryPlanIndexHook hook = QueryPlanIndexHookUtil.getHook(annotations, agentInstanceContext.getEngineImportService());
    if (queryPlanLogging && (queryPlanLogDestination.isInfoEnabled() || hook != null)) {
        String prefix = "Fire-and-forget from " + objectName + " ";
        String indexText = indexNameOrNull != null ? "index " + indexNameOrNull + " " : "full table scan ";
        indexText += "(snapshot only, for join see separate query plan) ";
        if (eventTableOrNull == null) {
            queryPlanLogDestination.info(prefix + indexText);
        } else {
            queryPlanLogDestination.info(prefix + indexText + eventTableOrNull.toQueryPlan());
        }

        if (hook != null) {
            hook.fireAndForget(new QueryPlanIndexDescFAF(new IndexNameAndDescPair[]{new IndexNameAndDescPair(indexNameOrNull, eventTableOrNull != null ? eventTableOrNull.getProviderClass().getSimpleName() : null)}));
        }
    }
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:18,代码来源:FireAndForgetQueryExec.java

示例2: determineSubqueryIndexFactory

import com.espertech.esper.epl.join.util.QueryPlanIndexHookUtil; //导入依赖的package包/类
private static Pair<EventTableFactory, SubordTableLookupStrategyFactory> determineSubqueryIndexFactory(ExprNode filterExpr,
                                                                             EventType viewableEventType,
                                                                             EventType[] outerEventTypes,
                                                                             StreamTypeService subselectTypeService,
                                                                             boolean fullTableScan,
                                                                             boolean queryPlanLogging,
                                                                             Set<String> optionalUniqueProps,
                                                                             Annotation[] annotations,
                                                                             int subqueryNum)
        throws ExprValidationException
{
    Pair<EventTableFactory, SubordTableLookupStrategyFactory> result = determineSubqueryIndexInternalFactory(filterExpr, viewableEventType, outerEventTypes, subselectTypeService, fullTableScan, optionalUniqueProps);

    if (queryPlanLogging && queryPlanLog.isInfoEnabled()) {
        queryPlanLog.info("local index");
        queryPlanLog.info("strategy " + result.getSecond().toQueryPlan());
        queryPlanLog.info("table " + result.getFirst().toQueryPlan());

        QueryPlanIndexHook hook = QueryPlanIndexHookUtil.getHook(annotations);
        if (hook != null) {
            hook.subquery(new QueryPlanIndexDescSubquery(null, result.getFirst().getEventTableClass().getSimpleName(), subqueryNum));
        }
    }

    return result;
}
 
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:27,代码来源:EPStatementStartMethodHelperSubselect.java

示例3: determineSubqueryIndexFactory

import com.espertech.esper.epl.join.util.QueryPlanIndexHookUtil; //导入依赖的package包/类
private static Pair<EventTableFactory, SubordTableLookupStrategyFactory> determineSubqueryIndexFactory(ExprNode filterExpr,
                                                                                                       EventType viewableEventType,
                                                                                                       EventType[] outerEventTypes,
                                                                                                       StreamTypeService subselectTypeService,
                                                                                                       boolean fullTableScan,
                                                                                                       boolean queryPlanLogging,
                                                                                                       Set<String> optionalUniqueProps,
                                                                                                       StatementContext statementContext,
                                                                                                       int subqueryNum)
        throws ExprValidationException {
    Pair<EventTableFactory, SubordTableLookupStrategyFactory> result = determineSubqueryIndexInternalFactory(filterExpr, viewableEventType, outerEventTypes, subselectTypeService, fullTableScan, optionalUniqueProps, statementContext);

    QueryPlanIndexHook hook = QueryPlanIndexHookUtil.getHook(statementContext.getAnnotations(), statementContext.getEngineImportService());
    if (queryPlanLogging && (QUERY_PLAN_LOG.isInfoEnabled() || hook != null)) {
        QUERY_PLAN_LOG.info("local index");
        QUERY_PLAN_LOG.info("strategy " + result.getSecond().toQueryPlan());
        QUERY_PLAN_LOG.info("table " + result.getFirst().toQueryPlan());
        if (hook != null) {
            String strategyName = result.getSecond().getClass().getSimpleName();
            hook.subquery(new QueryPlanIndexDescSubquery(
                new IndexNameAndDescPair[]{
                    new IndexNameAndDescPair(null, result.getFirst().getEventTableClass().getSimpleName())
                }, subqueryNum, strategyName));
        }
    }

    return result;
}
 
开发者ID:espertechinc,项目名称:esper,代码行数:29,代码来源:EPStatementStartMethodHelperSubselect.java


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