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