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


Java BufferView類代碼示例

本文整理匯總了Java中com.espertech.esper.view.internal.BufferView的典型用法代碼示例。如果您正苦於以下問題:Java BufferView類的具體用法?Java BufferView怎麽用?Java BufferView使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BufferView類屬於com.espertech.esper.view.internal包,在下文中一共展示了BufferView類的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setUp

import com.espertech.esper.view.internal.BufferView; //導入依賴的package包/類
public void setUp() {
    bufferViewOne = new BufferView(0);
    bufferViewTwo = new BufferView(1);

    joinExecutionStrategy = new SupportJoinExecutionStrategy();

    this.dispatchable = new JoinExecStrategyDispatchable(joinExecutionStrategy, 2);

    bufferViewOne.setObserver(dispatchable);
    bufferViewTwo.setObserver(dispatchable);
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:12,代碼來源:TestJoinExecStrategyDispatchable.java

示例2: JoinPreloadMethodImpl

import com.espertech.esper.view.internal.BufferView; //導入依賴的package包/類
/**
 * Ctor.
 * @param numStreams number of streams
 * @param joinSetComposer the composer holding stream indexes
 */
public JoinPreloadMethodImpl(int numStreams, JoinSetComposer joinSetComposer)
{
    this.numStreams = numStreams;
    this.bufferViews = new BufferView[numStreams];
    this.joinSetComposer = joinSetComposer;
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:12,代碼來源:JoinPreloadMethodImpl.java

示例3: setUp

import com.espertech.esper.view.internal.BufferView; //導入依賴的package包/類
public void setUp()
{
    bufferViewOne = new BufferView(0);
    bufferViewTwo = new BufferView(1);

    joinExecutionStrategy = new SupportJoinExecutionStrategy();

    this.dispatchable = new JoinExecStrategyDispatchable(joinExecutionStrategy, 2);

    bufferViewOne.setObserver(dispatchable);
    bufferViewTwo.setObserver(dispatchable);
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:13,代碼來源:TestJoinExecStrategyDispatchable.java

示例4: setBuffer

import com.espertech.esper.view.internal.BufferView; //導入依賴的package包/類
public void setBuffer(BufferView buffer, int i) {
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:3,代碼來源:JoinPreloadMethodNull.java

示例5: handleJoin

import com.espertech.esper.view.internal.BufferView; //導入依賴的package包/類
private JoinPlanResult handleJoin(String[] streamNames,
                                  Viewable[] streamViews,
                                  ResultSetProcessor resultSetProcessor,
                                  AgentInstanceContext agentInstanceContext,
                                  List<StopCallback> stopCallbacks,
                                  StreamJoinAnalysisResult joinAnalysisResult,
                                  boolean isRecoveringResilient) {
    final JoinSetComposerDesc joinSetComposerDesc = joinSetComposerPrototype.create(streamViews, false, agentInstanceContext, isRecoveringResilient);

    stopCallbacks.add(new StopCallback() {
        public void stop() {
            joinSetComposerDesc.getJoinSetComposer().destroy();
        }
    });

    JoinSetFilter filter = new JoinSetFilter(joinSetComposerDesc.getPostJoinFilterEvaluator());
    OutputProcessViewBase indicatorView = outputProcessViewFactory.makeView(resultSetProcessor, agentInstanceContext);

    // Create strategy for join execution
    JoinExecutionStrategy execution = new JoinExecutionStrategyImpl(joinSetComposerDesc.getJoinSetComposer(), filter, indicatorView, agentInstanceContext);

    // The view needs a reference to the join execution to pull iterator values
    indicatorView.setJoinExecutionStrategy(execution);

    // Hook up dispatchable with buffer and execution strategy
    JoinExecStrategyDispatchable joinStatementDispatch = new JoinExecStrategyDispatchable(execution, statementSpec.getStreamSpecs().length);
    agentInstanceContext.getEpStatementAgentInstanceHandle().setOptionalDispatchable(joinStatementDispatch);

    JoinPreloadMethod preloadMethod;
    if (joinAnalysisResult.isUnidirectional()) {
        preloadMethod = new JoinPreloadMethodNull();
    } else {
        if (!joinSetComposerDesc.getJoinSetComposer().allowsInit()) {
            preloadMethod = new JoinPreloadMethodNull();
        } else {
            preloadMethod = new JoinPreloadMethodImpl(streamNames.length, joinSetComposerDesc.getJoinSetComposer());
        }
    }

    // Create buffer for each view. Point buffer to dispatchable for join.
    for (int i = 0; i < statementSpec.getStreamSpecs().length; i++) {
        BufferView buffer = new BufferView(i);
        streamViews[i].addView(buffer);
        buffer.setObserver(joinStatementDispatch);
        preloadMethod.setBuffer(buffer, i);
    }

    return new JoinPlanResult(indicatorView, preloadMethod, joinSetComposerDesc);
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:50,代碼來源:StatementAgentInstanceFactorySelect.java

示例6: setBuffer

import com.espertech.esper.view.internal.BufferView; //導入依賴的package包/類
public void setBuffer(BufferView buffer, int i)
{        
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:4,代碼來源:JoinPreloadMethodNull.java

示例7: instantiate

import com.espertech.esper.view.internal.BufferView; //導入依賴的package包/類
public SubSelectStrategyRealization instantiate(final EPServicesContext services,
                                             Viewable viewableRoot,
                                             final AgentInstanceContext agentInstanceContext,
                                             List<StopCallback> stopCallbackList) {

    List<ViewFactory> viewFactoryChain = subSelectHolder.getViewFactoryChain().getViewFactoryChain();

    // add "prior" view factory
    boolean hasPrior = viewResourceDelegate.getPerStream()[0].getPriorRequests() != null && !viewResourceDelegate.getPerStream()[0].getPriorRequests().isEmpty();
    if (hasPrior) {
        PriorEventViewFactory priorEventViewFactory = EPStatementStartMethodHelperPrior.getPriorEventViewFactory(agentInstanceContext.getStatementContext(), 1024 + subqueryNumber, viewFactoryChain.size() + 1, viewFactoryChain.isEmpty());
        viewFactoryChain = new ArrayList<ViewFactory>(viewFactoryChain);
        viewFactoryChain.add(priorEventViewFactory);
    }

    // create factory chain context to hold callbacks specific to "prior" and "prev"
    AgentInstanceViewFactoryChainContext viewFactoryChainContext = AgentInstanceViewFactoryChainContext.create(viewFactoryChain, agentInstanceContext, viewResourceDelegate.getPerStream()[0]);

    ViewServiceCreateResult createResult = services.getViewService().createViews(viewableRoot, viewFactoryChain, viewFactoryChainContext, false);
    final Viewable subselectView = createResult.getFinalViewable();

    // create index/holder table
    final EventTable index = pair.getFirst().makeEventTable();
    stopCallbackList.add(new SubqueryStopCallback(index));

    // create strategy
    SubordTableLookupStrategy strategy = pair.getSecond().makeStrategy(index);
    SubselectAggregationPreprocessor subselectAggregationPreprocessor = null;

    // handle "prior" nodes and their strategies
    Map<ExprPriorNode, ExprPriorEvalStrategy> priorNodeStrategies = EPStatementStartMethodHelperPrior.compilePriorNodeStrategies(viewResourceDelegate, new AgentInstanceViewFactoryChainContext[]{viewFactoryChainContext});

    // handle "previous" nodes and their strategies
    Map<ExprPreviousNode, ExprPreviousEvalStrategy> previousNodeStrategies = EPStatementStartMethodHelperPrevious.compilePreviousNodeStrategies(viewResourceDelegate, new AgentInstanceViewFactoryChainContext[]{viewFactoryChainContext});

    AggregationService aggregationService = null;
    if (aggregationServiceFactory != null) {
        aggregationService = aggregationServiceFactory.getAggregationServiceFactory().makeService(agentInstanceContext, agentInstanceContext.getStatementContext().getMethodResolutionService());

        if (!correlatedSubquery) {
            SubselectAggregatorView aggregatorView = new SubselectAggregatorView(aggregationService, filterExprEval, agentInstanceContext);
            subselectView.addView(aggregatorView);

            preload(services, null, aggregatorView, agentInstanceContext);

            return new SubSelectStrategyRealization(NULL_ROW_STRATEGY, null, aggregationService, priorNodeStrategies, previousNodeStrategies, subselectView, null);
        }
        else {
            subselectAggregationPreprocessor = new SubselectAggregationPreprocessor(aggregationService, filterExprEval);
        }
    }

    // preload
    preload(services, index, subselectView, agentInstanceContext);
    StatementAgentInstancePostLoad postLoad = new StatementAgentInstancePostLoad() {
        public void executePostLoad() {
            preload(services, index, subselectView, agentInstanceContext);
        }
    };

    BufferView bufferView = new BufferView(subSelectHolder.getStreamNumber());
    bufferView.setObserver(new SubselectBufferObserver(index));
    subselectView.addView(bufferView);

    return new SubSelectStrategyRealization(strategy, subselectAggregationPreprocessor, aggregationService, priorNodeStrategies, previousNodeStrategies, subselectView, postLoad);
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:67,代碼來源:SubSelectStrategyFactoryLocalViewPreloaded.java

示例8: handleJoin

import com.espertech.esper.view.internal.BufferView; //導入依賴的package包/類
private JoinPlanResult handleJoin(String[] streamNames,
                                                     Viewable[] streamViews,
                                                     ResultSetProcessor resultSetProcessor,
                                                     AgentInstanceContext agentInstanceContext,
                                                     List<StopCallback> stopCallbacks,
                                                     StreamJoinAnalysisResult joinAnalysisResult)
{
    final JoinSetComposerDesc joinSetComposerDesc = joinSetComposerPrototype.create(streamViews, false);

    stopCallbacks.add(new StopCallback(){
        public void stop()
        {
            joinSetComposerDesc.getJoinSetComposer().destroy();
        }
    });

    JoinSetFilter filter = new JoinSetFilter(joinSetComposerDesc.getPostJoinFilterEvaluator());
    OutputProcessViewBase indicatorView = outputProcessViewFactory.makeView(resultSetProcessor, agentInstanceContext);

    // Create strategy for join execution
    JoinExecutionStrategy execution = new JoinExecutionStrategyImpl(joinSetComposerDesc.getJoinSetComposer(), filter, indicatorView, agentInstanceContext);

    // The view needs a reference to the join execution to pull iterator values
    indicatorView.setJoinExecutionStrategy(execution);

    // Hook up dispatchable with buffer and execution strategy
    JoinExecStrategyDispatchable joinStatementDispatch = new JoinExecStrategyDispatchable(execution, statementSpec.getStreamSpecs().size());
    agentInstanceContext.getEpStatementAgentInstanceHandle().setOptionalDispatchable(joinStatementDispatch);

    JoinPreloadMethod preloadMethod;
    if (joinAnalysisResult.getUnidirectionalStreamNumber() >= 0)
    {
        preloadMethod = new JoinPreloadMethodNull();
    }
    else
    {
        preloadMethod = new JoinPreloadMethodImpl(streamNames.length, joinSetComposerDesc.getJoinSetComposer());
    }

    // Create buffer for each view. Point buffer to dispatchable for join.
    for (int i = 0; i < statementSpec.getStreamSpecs().size(); i++)
    {
        BufferView buffer = new BufferView(i);
        streamViews[i].addView(buffer);
        buffer.setObserver(joinStatementDispatch);
        preloadMethod.setBuffer(buffer, i);
    }

    return new JoinPlanResult(indicatorView, preloadMethod, joinSetComposerDesc);
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:51,代碼來源:StatementAgentInstanceFactorySelect.java

示例9: setBuffer

import com.espertech.esper.view.internal.BufferView; //導入依賴的package包/類
/**
 * Sets the buffee to use.
 *
 * @param buffer buffer to use
 * @param i      stream
 */
public void setBuffer(BufferView buffer, int i);
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:8,代碼來源:JoinPreloadMethod.java

示例10: JoinPreloadMethodImpl

import com.espertech.esper.view.internal.BufferView; //導入依賴的package包/類
/**
 * Ctor.
 *
 * @param numStreams      number of streams
 * @param joinSetComposer the composer holding stream indexes
 */
public JoinPreloadMethodImpl(int numStreams, JoinSetComposer joinSetComposer) {
    this.numStreams = numStreams;
    this.bufferViews = new BufferView[numStreams];
    this.joinSetComposer = joinSetComposer;
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:12,代碼來源:JoinPreloadMethodImpl.java

示例11: setBuffer

import com.espertech.esper.view.internal.BufferView; //導入依賴的package包/類
/**
 * Sets the buffer for a stream to preload events from.
 *
 * @param view   buffer
 * @param stream the stream number for the buffer
 */
public void setBuffer(BufferView view, int stream) {
    bufferViews[stream] = view;
}
 
開發者ID:espertechinc,項目名稱:esper,代碼行數:10,代碼來源:JoinPreloadMethodImpl.java

示例12: setBuffer

import com.espertech.esper.view.internal.BufferView; //導入依賴的package包/類
/**
 * Sets the buffee to use.
 * @param buffer buffer to use
 * @param i stream
 */
public void setBuffer(BufferView buffer, int i);
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:7,代碼來源:JoinPreloadMethod.java

示例13: setBuffer

import com.espertech.esper.view.internal.BufferView; //導入依賴的package包/類
/**
 * Sets the buffer for a stream to preload events from.
 * @param view buffer
 * @param stream the stream number for the buffer
 */
public void setBuffer(BufferView view, int stream)
{
    bufferViews[stream] = view;
}
 
開發者ID:mobile-event-processing,項目名稱:Asper,代碼行數:10,代碼來源:JoinPreloadMethodImpl.java


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