本文整理汇总了Java中com.espertech.esper.core.service.InternalEventRouter类的典型用法代码示例。如果您正苦于以下问题:Java InternalEventRouter类的具体用法?Java InternalEventRouter怎么用?Java InternalEventRouter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
InternalEventRouter类属于com.espertech.esper.core.service包,在下文中一共展示了InternalEventRouter类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RouteResultView
import com.espertech.esper.core.service.InternalEventRouter; //导入依赖的package包/类
public RouteResultView(boolean isFirst,
EventType eventType,
EPStatementHandle epStatementHandle,
InternalEventRouter internalEventRouter,
TableStateInstance[] tableStateInstances,
EPStatementStartMethodOnTriggerItem[] items,
ResultSetProcessor[] processors,
ExprEvaluator[] whereClauses,
AgentInstanceContext agentInstanceContext) {
if (whereClauses.length != processors.length) {
throw new IllegalArgumentException("Number of where-clauses and processors does not match");
}
this.exprEvaluatorContext = agentInstanceContext;
this.eventType = eventType;
if (isFirst) {
handler = new RouteResultViewHandlerFirst(epStatementHandle, internalEventRouter, tableStateInstances, items, processors, whereClauses, agentInstanceContext);
} else {
handler = new RouteResultViewHandlerAll(epStatementHandle, internalEventRouter, tableStateInstances, items, processors, whereClauses, agentInstanceContext);
}
}
示例2: RouteResultView
import com.espertech.esper.core.service.InternalEventRouter; //导入依赖的package包/类
/**
* Ctor.
* @param isFirst true for the first-where clause, false for all where-clauses
* @param eventType output type
* @param epStatementHandle handle
* @param internalEventRouter routining output events
* @param processors processors for select clauses
* @param whereClauses where expressions
* @param statementContext statement context
*/
public RouteResultView(boolean isFirst, EventType eventType, EPStatementHandle epStatementHandle, InternalEventRouter internalEventRouter, boolean[] isNamedWindowInsert, ResultSetProcessor[] processors, ExprNode[] whereClauses, StatementContext statementContext)
{
if (whereClauses.length != processors.length)
{
throw new IllegalArgumentException("Number of where-clauses and processors does not match");
}
this.exprEvaluatorContext = new ExprEvaluatorContextStatement(statementContext);
this.eventType = eventType;
if (isFirst)
{
handler = new RouteResultViewHandlerFirst(epStatementHandle, internalEventRouter, isNamedWindowInsert, processors, ExprNodeUtility.getEvaluators(whereClauses), statementContext);
}
else
{
handler = new RouteResultViewHandlerAll(epStatementHandle, internalEventRouter, isNamedWindowInsert, processors, ExprNodeUtility.getEvaluators(whereClauses), statementContext);
}
}
示例3: RouteResultViewHandlerBase
import com.espertech.esper.core.service.InternalEventRouter; //导入依赖的package包/类
public RouteResultViewHandlerBase(EPStatementHandle epStatementHandle, InternalEventRouter internalEventRouter, TableStateInstance[] tableStateInstances, EPStatementStartMethodOnTriggerItem[] items, ResultSetProcessor[] processors, ExprEvaluator[] whereClauses, AgentInstanceContext agentInstanceContext) {
this.internalEventRouter = internalEventRouter;
this.tableStateInstances = tableStateInstances;
this.items = items;
this.epStatementHandle = epStatementHandle;
this.processors = processors;
this.whereClauses = whereClauses;
this.agentInstanceContext = agentInstanceContext;
this.audit = AuditEnum.INSERT.getAudit(agentInstanceContext.getAnnotations()) != null;
}
示例4: NamedWindowOnSelectViewFactory
import com.espertech.esper.core.service.InternalEventRouter; //导入依赖的package包/类
public NamedWindowOnSelectViewFactory(EventType namedWindowEventType, InternalEventRouter internalEventRouter, boolean addToFront, EPStatementHandle statementHandle, EventBeanReader eventBeanReader, boolean distinct, StatementResultService statementResultService, InternalEventRouteDest internalEventRouteDest, boolean deleteAndSelect, StreamSelector optionalStreamSelector, String optionalInsertIntoTableName) {
super(namedWindowEventType);
this.internalEventRouter = internalEventRouter;
this.addToFront = addToFront;
this.statementHandle = statementHandle;
this.eventBeanReader = eventBeanReader;
isDistinct = distinct;
this.statementResultService = statementResultService;
this.internalEventRouteDest = internalEventRouteDest;
this.deleteAndSelect = deleteAndSelect;
this.optionalStreamSelector = optionalStreamSelector;
this.optionalInsertIntoTableName = optionalInsertIntoTableName;
}
示例5: NamedWindowOnMergeActionIns
import com.espertech.esper.core.service.InternalEventRouter; //导入依赖的package包/类
public NamedWindowOnMergeActionIns(ExprEvaluator optionalFilter, SelectExprProcessor insertHelper, InternalEventRouter internalEventRouter, String insertIntoTableName, TableService tableService, EPStatementHandle statementHandle, InternalEventRouteDest internalEventRouteDest, boolean audit) {
super(optionalFilter);
this.insertHelper = insertHelper;
this.internalEventRouter = internalEventRouter;
this.insertIntoTableName = insertIntoTableName;
this.tableService = tableService;
this.statementHandle = statementHandle;
this.internalEventRouteDest = internalEventRouteDest;
this.audit = audit;
}
示例6: OutputStrategyPostProcessFactory
import com.espertech.esper.core.service.InternalEventRouter; //导入依赖的package包/类
public OutputStrategyPostProcessFactory(boolean route, SelectClauseStreamSelectorEnum insertIntoStreamSelector, SelectClauseStreamSelectorEnum selectStreamDirEnum, InternalEventRouter internalEventRouter, EPStatementHandle epStatementHandle, boolean addToFront, TableService tableService, String tableName) {
isRoute = route;
this.insertIntoStreamSelector = insertIntoStreamSelector;
this.selectStreamDirEnum = selectStreamDirEnum;
this.internalEventRouter = internalEventRouter;
this.epStatementHandle = epStatementHandle;
this.addToFront = addToFront;
this.tableService = tableService;
this.tableName = tableName;
}
示例7: setupInsert
import com.espertech.esper.core.service.InternalEventRouter; //导入依赖的package包/类
private TableOnMergeActionIns setupInsert(TableMetadata tableMetadata, InternalEventRouter internalEventRouter, int selectClauseNumber, OnTriggerMergeActionInsert desc, EventType triggeringEventType, String triggeringStreamName, StatementContext statementContext)
throws ExprValidationException {
// Compile insert-into info
String streamName = desc.getOptionalStreamName() != null ? desc.getOptionalStreamName() : tableMetadata.getTableName();
InsertIntoDesc insertIntoDesc = InsertIntoDesc.fromColumns(streamName, desc.getColumns());
EventType insertIntoTargetType = streamName.equals(tableMetadata.getTableName()) ? tableMetadata.getInternalEventType() : null;
// rewrite any wildcards to use "stream.wildcard"
if (triggeringStreamName == null) {
triggeringStreamName = UuidGenerator.generate();
}
List<SelectClauseElementCompiled> selectNoWildcard = NamedWindowOnMergeHelper.compileSelectNoWildcard(triggeringStreamName, desc.getSelectClauseCompiled());
// Set up event types for select-clause evaluation: The first type does not contain anything as its the named window row which is not present for insert
EventType dummyTypeNoProperties = new MapEventType(EventTypeMetadata.createAnonymous("merge_named_window_insert", EventTypeMetadata.ApplicationType.MAP), "merge_named_window_insert", 0, null, Collections.<String, Object>emptyMap(), null, null, null);
EventType[] eventTypes = new EventType[]{dummyTypeNoProperties, triggeringEventType};
String[] streamNames = new String[]{UuidGenerator.generate(), triggeringStreamName};
StreamTypeService streamTypeService = new StreamTypeServiceImpl(eventTypes, streamNames, new boolean[1], statementContext.getEngineURI(), false, false);
// Get select expr processor
SelectExprEventTypeRegistry selectExprEventTypeRegistry = new SelectExprEventTypeRegistry(statementContext.getStatementName(), statementContext.getStatementEventTypeRef());
ExprEvaluatorContextStatement exprEvaluatorContext = new ExprEvaluatorContextStatement(statementContext, false);
SelectExprProcessorForge insertHelperForge = SelectExprProcessorFactory.getProcessor(Collections.singleton(selectClauseNumber),
selectNoWildcard.toArray(new SelectClauseElementCompiled[selectNoWildcard.size()]), false, insertIntoDesc, insertIntoTargetType, null, streamTypeService,
statementContext.getEventAdapterService(), statementContext.getStatementResultService(), statementContext.getValueAddEventService(), selectExprEventTypeRegistry,
statementContext.getEngineImportService(), exprEvaluatorContext, statementContext.getVariableService(), statementContext.getTableService(), statementContext.getTimeProvider(), statementContext.getEngineURI(), statementContext.getStatementId(), statementContext.getStatementName(), statementContext.getAnnotations(), statementContext.getContextDescriptor(), statementContext.getConfigSnapshot(), null, statementContext.getNamedWindowMgmtService(), null, null,
statementContext.getStatementExtensionServicesContext());
SelectExprProcessor insertHelper = SelectExprProcessorCompiler.allocateSelectExprEvaluator(statementContext.getEventAdapterService(), insertHelperForge, statementContext.getEngineImportService(), TableOnMergeHelper.class, false, statementContext.getStatementName());
ExprEvaluator filterEval = desc.getOptionalWhereClause() == null ? null : ExprNodeCompiler.allocateEvaluator(desc.getOptionalWhereClause().getForge(), statementContext.getEngineImportService(), this.getClass(), false, statementContext.getStatementName());
InternalEventRouter routerToUser = streamName.equals(tableMetadata.getTableName()) ? null : internalEventRouter;
boolean audit = AuditEnum.INSERT.getAudit(statementContext.getAnnotations()) != null;
return new TableOnMergeActionIns(filterEval, insertHelper, routerToUser, statementContext.getEpStatementHandle(), statementContext.getInternalEventEngineRouteDest(), audit, tableMetadata.getRowFactory());
}
示例8: TableOnMergeActionIns
import com.espertech.esper.core.service.InternalEventRouter; //导入依赖的package包/类
public TableOnMergeActionIns(ExprEvaluator optionalFilter, SelectExprProcessor insertHelper, InternalEventRouter internalEventRouter, EPStatementHandle statementHandle, InternalEventRouteDest internalEventRouteDest, boolean audit, TableStateRowFactory tableStateRowFactory) {
super(optionalFilter);
this.insertHelper = insertHelper;
this.internalEventRouter = internalEventRouter;
this.statementHandle = statementHandle;
this.internalEventRouteDest = internalEventRouteDest;
this.audit = audit;
this.tableStateRowFactory = tableStateRowFactory;
}
示例9: make
import com.espertech.esper.core.service.InternalEventRouter; //导入依赖的package包/类
public static TableOnViewFactory make(TableMetadata tableMetadata,
OnTriggerDesc onTriggerDesc,
EventType filterEventType,
String filterStreamName,
StatementContext statementContext,
StatementMetricHandle metricsHandle,
boolean isDistinct,
InternalEventRouter internalEventRouter
)
throws ExprValidationException {
if (onTriggerDesc.getOnTriggerType() == OnTriggerType.ON_DELETE) {
return new TableOnDeleteViewFactory(statementContext.getStatementResultService(), tableMetadata);
} else if (onTriggerDesc.getOnTriggerType() == OnTriggerType.ON_SELECT) {
EventBeanReader eventBeanReader = null;
if (isDistinct) {
eventBeanReader = tableMetadata.getInternalEventType().getReader();
}
OnTriggerWindowDesc windowDesc = (OnTriggerWindowDesc) onTriggerDesc;
return new TableOnSelectViewFactory(tableMetadata, internalEventRouter, statementContext.getEpStatementHandle(),
eventBeanReader, isDistinct, statementContext.getStatementResultService(), statementContext.getInternalEventEngineRouteDest(), windowDesc.isDeleteAndSelect());
} else if (onTriggerDesc.getOnTriggerType() == OnTriggerType.ON_UPDATE) {
OnTriggerWindowUpdateDesc updateDesc = (OnTriggerWindowUpdateDesc) onTriggerDesc;
EventBeanUpdateHelper updateHelper = EventBeanUpdateHelperFactory.make(tableMetadata.getTableName(), (EventTypeSPI) tableMetadata.getInternalEventType(), updateDesc.getAssignments(), updateDesc.getOptionalAsName(), filterEventType, false, statementContext.getStatementName(), statementContext.getEngineURI(), statementContext.getEventAdapterService(), false);
TableUpdateStrategy updateStrategy = statementContext.getTableService().getTableUpdateStrategy(tableMetadata, updateHelper, false);
TableOnUpdateViewFactory onUpdateViewFactory = new TableOnUpdateViewFactory(statementContext.getStatementResultService(), tableMetadata, updateHelper, updateStrategy);
statementContext.getTableService().addTableUpdateStrategyReceiver(tableMetadata, statementContext.getStatementName(), onUpdateViewFactory, updateHelper, false);
return onUpdateViewFactory;
} else if (onTriggerDesc.getOnTriggerType() == OnTriggerType.ON_MERGE) {
OnTriggerMergeDesc onMergeTriggerDesc = (OnTriggerMergeDesc) onTriggerDesc;
TableOnMergeHelper onMergeHelper = new TableOnMergeHelper(statementContext, onMergeTriggerDesc, filterEventType, filterStreamName, internalEventRouter, tableMetadata);
return new TableOnMergeViewFactory(tableMetadata, onMergeHelper, statementContext.getStatementResultService(), metricsHandle, statementContext.getMetricReportingService());
} else {
throw new IllegalStateException("Unknown trigger type " + onTriggerDesc.getOnTriggerType());
}
}
示例10: TableOnSelectViewFactory
import com.espertech.esper.core.service.InternalEventRouter; //导入依赖的package包/类
public TableOnSelectViewFactory(TableMetadata tableMetadata, InternalEventRouter internalEventRouter, EPStatementHandle statementHandle, EventBeanReader eventBeanReader, boolean distinct, StatementResultService statementResultService, InternalEventRouteDest internalEventRouteDest, boolean deleteAndSelect) {
this.tableMetadata = tableMetadata;
this.internalEventRouter = internalEventRouter;
this.statementHandle = statementHandle;
this.eventBeanReader = eventBeanReader;
isDistinct = distinct;
this.statementResultService = statementResultService;
this.internalEventRouteDest = internalEventRouteDest;
this.deleteAndSelect = deleteAndSelect;
}
示例11: RouteResultViewHandlerAll
import com.espertech.esper.core.service.InternalEventRouter; //导入依赖的package包/类
/**
* Ctor.
* @param epStatementHandle handle
* @param internalEventRouter routes generated events
* @param processors select clauses
* @param whereClauses where clauses
* @param statementContext statement services
*/
public RouteResultViewHandlerAll(EPStatementHandle epStatementHandle, InternalEventRouter internalEventRouter, boolean[] isNamedWindowInsert, ResultSetProcessor[] processors, ExprEvaluator[] whereClauses, StatementContext statementContext)
{
this.internalEventRouter = internalEventRouter;
this.isNamedWindowInsert = isNamedWindowInsert;
this.epStatementHandle = epStatementHandle;
this.processors = processors;
this.whereClauses = whereClauses;
this.statementContext = statementContext;
this.audit = AuditEnum.INSERT.getAudit(statementContext.getAnnotations()) != null;
}
示例12: RouteResultViewHandlerFirst
import com.espertech.esper.core.service.InternalEventRouter; //导入依赖的package包/类
/**
* Ctor.
* @param epStatementHandle handle
* @param internalEventRouter routes generated events
* @param processors select clauses
* @param whereClauses where clauses
* @param statementContext statement services
*/
public RouteResultViewHandlerFirst(EPStatementHandle epStatementHandle, InternalEventRouter internalEventRouter, boolean[] isNamedWindowInsert, ResultSetProcessor[] processors, ExprEvaluator[] whereClauses, StatementContext statementContext)
{
this.internalEventRouter = internalEventRouter;
this.isNamedWindowInsert = isNamedWindowInsert;
this.epStatementHandle = epStatementHandle;
this.processors = processors;
this.whereClauses = whereClauses;
this.statementContext = statementContext;
this.exprEvaluatorContextStatement = new ExprEvaluatorContextStatement(statementContext);
this.audit = AuditEnum.INSERT.getAudit(statementContext.getAnnotations()) != null;
}
示例13: NamedWindowOnSelectViewFactory
import com.espertech.esper.core.service.InternalEventRouter; //导入依赖的package包/类
public NamedWindowOnSelectViewFactory(EventType namedWindowEventType, InternalEventRouter internalEventRouter, boolean addToFront, EPStatementHandle statementHandle, EventBeanReader eventBeanReader, boolean distinct, EventType outputEventType, StatementResultService statementResultService, InternalEventRouteDest internalEventRouteDest, boolean deleteAndSelect) {
super(namedWindowEventType);
this.internalEventRouter = internalEventRouter;
this.addToFront = addToFront;
this.statementHandle = statementHandle;
this.eventBeanReader = eventBeanReader;
isDistinct = distinct;
this.outputEventType = outputEventType;
this.statementResultService = statementResultService;
this.internalEventRouteDest = internalEventRouteDest;
this.deleteAndSelect = deleteAndSelect;
}
示例14: NamedWindowOnMergeActionIns
import com.espertech.esper.core.service.InternalEventRouter; //导入依赖的package包/类
public NamedWindowOnMergeActionIns(ExprEvaluator optionalFilter, SelectExprProcessor insertHelper, InternalEventRouter internalEventRouter, EPStatementHandle statementHandle, InternalEventRouteDest internalEventRouteDest, boolean audit) {
super(optionalFilter);
this.insertHelper = insertHelper;
this.internalEventRouter = internalEventRouter;
this.statementHandle = statementHandle;
this.internalEventRouteDest = internalEventRouteDest;
this.audit = audit;
}
示例15: OutputStrategyPostProcessFactory
import com.espertech.esper.core.service.InternalEventRouter; //导入依赖的package包/类
public OutputStrategyPostProcessFactory(boolean route, SelectClauseStreamSelectorEnum insertIntoStreamSelector, SelectClauseStreamSelectorEnum selectStreamDirEnum, InternalEventRouter internalEventRouter, EPStatementHandle epStatementHandle, boolean addToFront) {
isRoute = route;
this.insertIntoStreamSelector = insertIntoStreamSelector;
this.selectStreamDirEnum = selectStreamDirEnum;
this.internalEventRouter = internalEventRouter;
this.epStatementHandle = epStatementHandle;
this.addToFront = addToFront;
}