Package com.espertech.esper.core.context.factory

Examples of com.espertech.esper.core.context.factory.StatementAgentInstanceFactorySelectResult


        StatementAgentInstanceLock lock = startResult.getAgentInstanceContext().getEpStatementAgentInstanceHandle().getStatementAgentInstanceLock();
        StatementResourceHolder recoveryResources = null;

        if (startResult instanceof StatementAgentInstanceFactorySelectResult) {
            StatementAgentInstanceFactorySelectResult selectResult = (StatementAgentInstanceFactorySelectResult) startResult;
            recoveryResources = new StatementResourceHolder(
                    lock,
                    selectResult.getTopViews(),
                    selectResult.getEventStreamViewables(),
                    selectResult.getPatternRoots(),
                    selectResult.getOptionalAggegationService(),
                    selectResult.getSubselectStrategies(),
                    selectResult.getOptionalPostLoadJoin());
        }

        if (startResult instanceof StatementAgentInstanceFactoryCreateWindowResult) {
            StatementAgentInstanceFactoryCreateWindowResult createResult = (StatementAgentInstanceFactoryCreateWindowResult) startResult;
            recoveryResources = new StatementResourceHolder(lock,new Viewable[] {createResult.getTopView()}, null,
View Full Code Here


                }
            };
        }
        // Without context - start here
        else {
            final StatementAgentInstanceFactorySelectResult resultOfStart = contextFactory.newContext(agentInstanceContext);
            finalViewable = resultOfStart.getFinalView();
            stopStatementMethod = new EPStatementStopMethod() {
                public void stop() {
                    StatementAgentInstanceUtil.stopSafe(resultOfStart.getStopCallback(), statementContext);
                    stopMethod.stop();
                }
            };
            destroyStatementMethod = null;
            aggregationService = resultOfStart.getOptionalAggegationService();
            subselectStrategyInstances = resultOfStart.getSubselectStrategies();
            priorStrategyInstances = resultOfStart.getPriorNodeStrategies();
            previousStrategyInstances = resultOfStart.getPreviousNodeStrategies();
        }

        // initialize aggregation expression nodes
        if (resultSetProcessorPrototypeDesc.getAggregationServiceFactoryDesc() != null) {
            EPStatementStartMethodHelperAssignExpr.assignAggregations(aggregationService, resultSetProcessorPrototypeDesc.getAggregationServiceFactoryDesc().getExpressions());
View Full Code Here

                }
            };
        }
        // Without context - start here
        else {
            final StatementAgentInstanceFactorySelectResult resultOfStart = selectDesc.getStatementAgentInstanceFactorySelect().newContext(defaultAgentInstanceContext);
            finalViewable = resultOfStart.getFinalView();
            stopStatementMethod = new EPStatementStopMethod() {
                public void stop() {
                    StatementAgentInstanceUtil.stopSafe(resultOfStart.getStopCallback(), statementContext);
                    selectDesc.getStopMethod().stop();
                }
            };
            destroyStatementMethod = null;
            aggregationService = resultOfStart.getOptionalAggegationService();
            subselectStrategyInstances = resultOfStart.getSubselectStrategies();
            priorStrategyInstances = resultOfStart.getPriorNodeStrategies();
            previousStrategyInstances = resultOfStart.getPreviousNodeStrategies();
            preloadList = resultOfStart.getPreloadList();
        }

        // assign strategies to expression nodes
        EPStatementStartMethodHelperAssignExpr.assignExpressionStrategies(selectDesc, aggregationService, subselectStrategyInstances, priorStrategyInstances, previousStrategyInstances);
View Full Code Here

                }
            };
        }
        // Without context - start here
        else {
            final StatementAgentInstanceFactorySelectResult resultOfStart = contextFactory.newContext(agentInstanceContext);
            finalViewable = resultOfStart.getFinalView();
            stopStatementMethod = new EPStatementStopMethod() {
                public void stop() {
                    StatementAgentInstanceUtil.stopSafe(resultOfStart.getStopCallback(), statementContext);
                    stopMethod.stop();
                }
            };
            destroyStatementMethod = null;
            aggregationService = resultOfStart.getOptionalAggegationService();
            subselectStrategyInstances = resultOfStart.getSubselectStrategies();
            priorStrategyInstances = resultOfStart.getPriorNodeStrategies();
            previousStrategyInstances = resultOfStart.getPreviousNodeStrategies();
            preloadList = resultOfStart.getPreloadList();
        }

        // initialize aggregation expression nodes
        if (resultSetProcessorPrototypeDesc.getAggregationServiceFactoryDesc() != null) {
            EPStatementStartMethodHelperAssignExpr.assignAggregations(aggregationService, resultSetProcessorPrototypeDesc.getAggregationServiceFactoryDesc().getExpressions());
View Full Code Here

                }
            };
        }
        // Without context - start here
        else {
            final StatementAgentInstanceFactorySelectResult resultOfStart = selectDesc.getStatementAgentInstanceFactorySelect().newContext(defaultAgentInstanceContext, isRecoveringResilient);
            finalViewable = resultOfStart.getFinalView();
            stopStatementMethod = new EPStatementStopMethod() {
                public void stop() {
                    StatementAgentInstanceUtil.stopSafe(resultOfStart.getStopCallback(), statementContext);
                    selectDesc.getStopMethod().stop();
                }
            };
            destroyStatementMethod = null;
            aggregationService = resultOfStart.getOptionalAggegationService();
            subselectStrategyInstances = resultOfStart.getSubselectStrategies();
            priorStrategyInstances = resultOfStart.getPriorNodeStrategies();
            previousStrategyInstances = resultOfStart.getPreviousNodeStrategies();
            preloadList = resultOfStart.getPreloadList();

            if (statementContext.getExtensionServicesContext() != null) {
                statementContext.getExtensionServicesContext().startContextPartition(resultOfStart, 0);
            }
        }
View Full Code Here

                }
            };
        }
        // Without context - start here
        else {
            StatementAgentInstanceFactorySelectResult resultOfStart = selectDesc.getStatementAgentInstanceFactorySelect().newContext(defaultAgentInstanceContext, isRecoveringResilient);
            finalViewable = resultOfStart.getFinalView();
            final EPStatementStopMethod selectStop = selectDesc.getStopMethod();
            final StopCallback startResultStop = resultOfStart.getStopCallback();
            stopStatementMethod = new EPStatementStopMethod() {
                public void stop() {
                    StatementAgentInstanceUtil.stopSafe(startResultStop, statementContext);
                    selectStop.stop();
                }
            };
            destroyStatementMethod = null;
            aggregationService = resultOfStart.getOptionalAggegationService();
            subselectStrategyInstances = resultOfStart.getSubselectStrategies();
            priorStrategyInstances = resultOfStart.getPriorNodeStrategies();
            previousStrategyInstances = resultOfStart.getPreviousNodeStrategies();
            preloadList = resultOfStart.getPreloadList();

            EventRowRegexNFAViewService matchRecognize = EventRowRegexHelper.recursiveFindRegexService(resultOfStart.getTopViews()[0]);
            if (matchRecognize != null) {
                matchRecognizePrevEvalStrategy = matchRecognize.getPreviousEvaluationStrategy();
            }
            else {
                matchRecognizePrevEvalStrategy = null;
View Full Code Here

        StatementAgentInstanceLock lock = startResult.getAgentInstanceContext().getEpStatementAgentInstanceHandle().getStatementAgentInstanceLock();
        StatementResourceHolder recoveryResources = null;

        if (startResult instanceof StatementAgentInstanceFactorySelectResult) {
            StatementAgentInstanceFactorySelectResult selectResult = (StatementAgentInstanceFactorySelectResult) startResult;
            recoveryResources = new StatementResourceHolder(
                    lock,
                    selectResult.getTopViews(),
                    selectResult.getEventStreamViewables(),
                    selectResult.getPatternRoots(),
                    selectResult.getOptionalAggegationService(),
                    selectResult.getSubselectStrategies(),
                    selectResult.getOptionalPostLoadJoin());
        }

        if (startResult instanceof StatementAgentInstanceFactoryCreateWindowResult) {
            StatementAgentInstanceFactoryCreateWindowResult createResult = (StatementAgentInstanceFactoryCreateWindowResult) startResult;
            recoveryResources = new StatementResourceHolder(lock,new Viewable[] {createResult.getTopView()}, null,
View Full Code Here

                }
            };
        }
        // Without context - start here
        else {
            StatementAgentInstanceFactorySelectResult resultOfStart = selectDesc.getStatementAgentInstanceFactorySelect().newContext(defaultAgentInstanceContext, isRecoveringResilient);
            finalViewable = resultOfStart.getFinalView();
            final EPStatementStopMethod selectStop = selectDesc.getStopMethod();
            final StopCallback startResultStop = resultOfStart.getStopCallback();
            stopStatementMethod = new EPStatementStopMethod() {
                public void stop() {
                    StatementAgentInstanceUtil.stopSafe(startResultStop, statementContext);
                    selectStop.stop();
                }
            };
            destroyStatementMethod = null;
            aggregationService = resultOfStart.getOptionalAggegationService();
            subselectStrategyInstances = resultOfStart.getSubselectStrategies();
            priorStrategyInstances = resultOfStart.getPriorNodeStrategies();
            previousStrategyInstances = resultOfStart.getPreviousNodeStrategies();
            preloadList = resultOfStart.getPreloadList();

            if (statementContext.getExtensionServicesContext() != null) {
                statementContext.getExtensionServicesContext().startContextPartition(resultOfStart, 0);
            }
        }
View Full Code Here

                }
            };
        }
        // Without context - start here
        else {
            StatementAgentInstanceFactorySelectResult resultOfStart = selectDesc.getStatementAgentInstanceFactorySelect().newContext(defaultAgentInstanceContext, isRecoveringResilient);
            finalViewable = resultOfStart.getFinalView();
            final EPStatementStopMethod selectStop = selectDesc.getStopMethod();
            final StopCallback startResultStop = resultOfStart.getStopCallback();
            stopStatementMethod = new EPStatementStopMethod() {
                public void stop() {
                    StatementAgentInstanceUtil.stopSafe(startResultStop, statementContext);
                    selectStop.stop();
                }
            };
            destroyStatementMethod = null;
            aggregationService = resultOfStart.getOptionalAggegationService();
            subselectStrategyInstances = resultOfStart.getSubselectStrategies();
            priorStrategyInstances = resultOfStart.getPriorNodeStrategies();
            previousStrategyInstances = resultOfStart.getPreviousNodeStrategies();
            preloadList = resultOfStart.getPreloadList();

            if (statementContext.getExtensionServicesContext() != null) {
                statementContext.getExtensionServicesContext().startContextPartition(resultOfStart, 0);
            }
        }
View Full Code Here

TOP

Related Classes of com.espertech.esper.core.context.factory.StatementAgentInstanceFactorySelectResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.