Package com.espertech.esper.core.context.activator

Examples of com.espertech.esper.core.context.activator.ViewableActivationResult


        try {
            // create root viewables
            eventStreamParentViewable = new Viewable[numStreams];
            patternRoots = new EvalRootState[numStreams];
            for (int stream = 0; stream < eventStreamParentViewableActivators.length; stream++) {
                ViewableActivationResult activationResult = eventStreamParentViewableActivators[stream].activate(agentInstanceContext, false, isRecoveringResilient);
                viewableActivationResult[stream] = activationResult;
                stopCallbacks.add(activationResult.getStopCallback());

                eventStreamParentViewable[stream] = activationResult.getViewable();
                patternRoots[stream] = activationResult.getOptionalPatternRoot();

                if (activationResult.getOptionalLock() != null) {
                    agentInstanceContext.getEpStatementAgentInstanceHandle().setStatementAgentInstanceLock(activationResult.getOptionalLock());
                    statementContext.setDefaultAgentInstanceLock(activationResult.getOptionalLock());
                }
            }

            // compile view factories adding "prior" as necessary
            List<ViewFactory>[] viewFactoryChains = new List[numStreams];
View Full Code Here


            // create root viewables
            eventStreamParentViewable = new Viewable[numStreams];
            patternRoots = new EvalRootState[numStreams];

            for (int stream = 0; stream < eventStreamParentViewableActivators.length; stream++) {
                ViewableActivationResult activationResult = eventStreamParentViewableActivators[stream].activate(agentInstanceContext, false, isRecoveringResilient);
                viewableActivationResult[stream] = activationResult;
                stopCallbacks.add(activationResult.getStopCallback());
                suppressSameEventMatches = activationResult.isSuppressSameEventMatches();
                discardPartialsOnMatch = activationResult.isDiscardPartialsOnMatch();

                eventStreamParentViewable[stream] = activationResult.getViewable();
                patternRoots[stream] = activationResult.getOptionalPatternRoot();

                if (activationResult.getOptionalLock() != null) {
                    agentInstanceContext.getEpStatementAgentInstanceHandle().setStatementAgentInstanceLock(activationResult.getOptionalLock());
                    statementContext.setDefaultAgentInstanceLock(activationResult.getOptionalLock());
                }
            }

            // compile view factories adding "prior" as necessary
            List<ViewFactory>[] viewFactoryChains = new List[numStreams];
View Full Code Here

                    throw new IllegalStateException("Failed to find viewable for filter");
                }
                final EPLSelectViewable viewable = found;
                return new ViewableActivator() {
                    public ViewableActivationResult activate(AgentInstanceContext agentInstanceContext, boolean isSubselect, boolean isRecoveringResilient) {
                        return new ViewableActivationResult(viewable, new StopCallback() {public void stop() {}}, null, null, false, false);
                    }
                };
            }
        };
View Full Code Here

        try {
            // create root viewables
            Viewable[] eventStreamParentViewable = new Viewable[numStreams];
            for (int stream = 0; stream < eventStreamParentViewableActivators.length; stream++) {
                ViewableActivationResult activationResult = eventStreamParentViewableActivators[stream].activate(agentInstanceContext);
                viewableActivationResult[stream] = activationResult;
                stopCallbacks.add(activationResult.getStopCallback());

                eventStreamParentViewable[stream] = activationResult.getViewable();

                if (activationResult.getOptionalLock() != null) {
                    agentInstanceContext.getEpStatementAgentInstanceHandle().setStatementAgentInstanceLock(activationResult.getOptionalLock());
                    statementContext.setDefaultAgentInstanceLock(activationResult.getOptionalLock());
                }
            }

            // compile view factories adding "prior" as necessary
            List<ViewFactory>[] viewFactoryChains = new List[numStreams];
View Full Code Here

        String windowName = statementSpec.getCreateWindowDesc().getWindowName();
        Viewable finalView;

        try {
            // Register interest
            ViewableActivationResult activationResult = activator.activate(agentInstanceContext);
            stopCallbacks.add(activationResult.getStopCallback());
            Viewable eventStreamParentViewable = activationResult.getViewable();

            // Obtain processor for this named window
            NamedWindowProcessor processor = services.getNamedWindowService().getProcessor(windowName);

            // Allocate processor instance
View Full Code Here

                OnTriggerSplitStreamDesc desc = (OnTriggerSplitStreamDesc) statementSpec.getOnTriggerDesc();
                onExprView = new RouteResultView(desc.isFirst(), activatorResultEventType, statementContext.getEpStatementHandle(), services.getInternalEventRouter(), splitDesc.getNamedWindowInsert(), processors, splitDesc.getWhereClauses(), statementContext);
            }

            // attach stream to view
            final ViewableActivationResult activationResult = activator.activate(agentInstanceContext);
            activationResult.getViewable().addView(onExprView);
            stopCallbacks.add(activationResult.getStopCallback());

            // start subselects
            subselectStrategies = EPStatementStartMethodHelperSubselect.startSubselects(services, subSelectStrategyCollection, agentInstanceContext, stopCallbacks);

            // attach view to output: for on-delete, create an output processor that passes on as a wildcard the underlying event
View Full Code Here

                    throw new IllegalStateException("Failed to find viewable for filter");
                }
                final EPLSelectViewable viewable = found;
                return new ViewableActivator() {
                    public ViewableActivationResult activate(AgentInstanceContext agentInstanceContext, boolean isSubselect) {
                        return new ViewableActivationResult(viewable, new StopCallback() {public void stop() {}}, null);
                    }
                };
            }
        };
View Full Code Here

        try {
            // create root viewables
            Viewable[] eventStreamParentViewable = new Viewable[numStreams];
            for (int stream = 0; stream < eventStreamParentViewableActivators.length; stream++) {
                ViewableActivationResult activationResult = eventStreamParentViewableActivators[stream].activate(agentInstanceContext, false);
                viewableActivationResult[stream] = activationResult;
                stopCallbacks.add(activationResult.getStopCallback());

                eventStreamParentViewable[stream] = activationResult.getViewable();

                if (activationResult.getOptionalLock() != null) {
                    agentInstanceContext.getEpStatementAgentInstanceHandle().setStatementAgentInstanceLock(activationResult.getOptionalLock());
                    statementContext.setDefaultAgentInstanceLock(activationResult.getOptionalLock());
                }
            }

            // compile view factories adding "prior" as necessary
            List<ViewFactory>[] viewFactoryChains = new List[numStreams];
View Full Code Here

        String windowName = statementSpec.getCreateWindowDesc().getWindowName();
        Viewable finalView;

        try {
            // Register interest
            ViewableActivationResult activationResult = activator.activate(agentInstanceContext, false);
            stopCallbacks.add(activationResult.getStopCallback());
            Viewable eventStreamParentViewable = activationResult.getViewable();

            // Obtain processor for this named window
            NamedWindowProcessor processor = services.getNamedWindowService().getProcessor(windowName);

            if (processor == null) {
View Full Code Here

                OnTriggerSplitStreamDesc desc = (OnTriggerSplitStreamDesc) statementSpec.getOnTriggerDesc();
                onExprView = new RouteResultView(desc.isFirst(), activatorResultEventType, statementContext.getEpStatementHandle(), services.getInternalEventRouter(), splitDesc.getNamedWindowInsert(), processors, splitDesc.getWhereClauses(), statementContext);
            }

            // attach stream to view
            final ViewableActivationResult activationResult = activator.activate(agentInstanceContext, false);
            activationResult.getViewable().addView(onExprView);
            stopCallbacks.add(activationResult.getStopCallback());

            // start subselects
            subselectStrategies = EPStatementStartMethodHelperSubselect.startSubselects(services, subSelectStrategyCollection, agentInstanceContext, stopCallbacks);

            // attach view to output: for on-delete, create an output processor that passes on as a wildcard the underlying event
View Full Code Here

TOP

Related Classes of com.espertech.esper.core.context.activator.ViewableActivationResult

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.