當前位置: 首頁>>代碼示例>>Java>>正文


Java EPStatementDispatch類代碼示例

本文整理匯總了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;
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:60,代碼來源:StatementAgentInstanceFactorySelect.java

示例2: getOptionalDispatchable

import com.espertech.esper.core.service.EPStatementDispatch; //導入依賴的package包/類
public EPStatementDispatch getOptionalDispatchable() {
    return optionalDispatchable;
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:4,代碼來源:EPStatementAgentInstanceHandle.java

示例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;
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:11,代碼來源:EPStatementAgentInstanceHandle.java

示例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;
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:11,代碼來源:EPStatementAgentInstanceHandle.java


注:本文中的com.espertech.esper.core.service.EPStatementDispatch類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。