本文整理汇总了Java中com.espertech.esper.core.service.EPStatementDispatch类的典型用法代码示例。如果您正苦于以下问题:Java EPStatementDispatch类的具体用法?Java EPStatementDispatch怎么用?Java EPStatementDispatch使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EPStatementDispatch类属于com.espertech.esper.core.service包,在下文中一共展示了EPStatementDispatch类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleSimpleSelect
import com.espertech.esper.core.service.EPStatementDispatch; //导入依赖的package包/类
private Viewable handleSimpleSelect(Viewable view,
ResultSetProcessor resultSetProcessor,
AgentInstanceContext agentInstanceContext,
EvalRootMatchRemover evalRootMatchRemover,
boolean suppressSameEventMatches,
boolean discardPartialsOnMatch) {
Viewable finalView = view;
// Add filter view that evaluates the filter expression
if (filterRootNodeEvaluator != null) {
FilterExprView filterView = new FilterExprView(statementSpec.getFilterRootNode(), filterRootNodeEvaluator, agentInstanceContext);
finalView.addView(filterView);
finalView = filterView;
}
Deque<EPStatementDispatch> dispatches = null;
if (evalRootMatchRemover != null && (suppressSameEventMatches || discardPartialsOnMatch)) {
PatternRemoveDispatchView v = new PatternRemoveDispatchView(evalRootMatchRemover, suppressSameEventMatches, discardPartialsOnMatch);
dispatches = new ArrayDeque<EPStatementDispatch>(2);
dispatches.add(v);
finalView.addView(v);
finalView = v;
}
// for ordered deliver without output limit/buffer
if (statementSpec.getOrderByList().length > 0 && (statementSpec.getOutputLimitSpec() == null)) {
SingleStreamDispatchView bf = new SingleStreamDispatchView();
if (dispatches == null) {
dispatches = new ArrayDeque<EPStatementDispatch>(1);
}
dispatches.add(bf);
finalView.addView(bf);
finalView = bf;
}
if (dispatches != null) {
EPStatementAgentInstanceHandle handle = agentInstanceContext.getEpStatementAgentInstanceHandle();
if (dispatches.size() == 1) {
handle.setOptionalDispatchable(dispatches.getFirst());
} else {
final EPStatementDispatch[] dispatchArray = dispatches.toArray(new EPStatementDispatch[dispatches.size()]);
handle.setOptionalDispatchable(new EPStatementDispatch() {
public void execute() {
for (EPStatementDispatch dispatch : dispatchArray) {
dispatch.execute();
}
}
});
}
}
com.espertech.esper.view.View selectView = outputProcessViewFactory.makeView(resultSetProcessor, agentInstanceContext);
finalView.addView(selectView);
finalView = selectView;
return finalView;
}
示例2: getOptionalDispatchable
import com.espertech.esper.core.service.EPStatementDispatch; //导入依赖的package包/类
public EPStatementDispatch getOptionalDispatchable() {
return optionalDispatchable;
}
示例3: setOptionalDispatchable
import com.espertech.esper.core.service.EPStatementDispatch; //导入依赖的package包/类
/**
* Provides a callback for use when statement processing for filters and schedules is done,
* for use by join statements that require an explicit indicator that all
* joined streams results have been processed.
*
* @param optionalDispatchable is the instance for calling onto after statement callback processing
*/
public void setOptionalDispatchable(EPStatementDispatch optionalDispatchable) {
this.optionalDispatchable = optionalDispatchable;
}
示例4: setOptionalDispatchable
import com.espertech.esper.core.service.EPStatementDispatch; //导入依赖的package包/类
/**
* Provides a callback for use when statement processing for filters and schedules is done,
* for use by join statements that require an explicit indicator that all
* joined streams results have been processed.
* @param optionalDispatchable is the instance for calling onto after statement callback processing
*/
public void setOptionalDispatchable(EPStatementDispatch optionalDispatchable)
{
this.optionalDispatchable = optionalDispatchable;
}