コード例 #1
0
        public EPPreparedQueryResult Execute(
            FAFQueryMethodSelect select,
            ContextPartitionSelector[] contextPartitionSelectors,
            FAFQueryMethodAssignerSetter assignerSetter,
            ContextManagementService contextManagementService)
        {
            FireAndForgetProcessor processor = select.Processors[0];
            FireAndForgetInstance processorInstance = processor.ProcessorInstanceNoContext;

            ICollection<EventBean> events;
            AgentInstanceContext agentInstanceContext = null;
            if (processorInstance == null) {
                events = EmptyList<EventBean>.Instance;
            }
            else {
                agentInstanceContext = processorInstance.AgentInstanceContext;
                events = Snapshot(select.ConsumerFilters[0], processorInstance, select.QueryGraph, select.Annotations);
            }

            // get RSP
            ResultSetProcessor resultSetProcessor = ProcessorWithAssign(
                select.ResultSetProcessorFactoryProvider,
                agentInstanceContext,
                assignerSetter,
                select.TableAccesses,
                select.Subselects);

            if (select.WhereClause != null) {
                events = Filtered(events, select.WhereClause, agentInstanceContext);
            }

            return ProcessedNonJoin(resultSetProcessor, events, select.DistinctKeyGetter);
        }
コード例 #2
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="container">The container.</param>
 /// <param name="engineImportService">engine imports</param>
 /// <param name="variableService">variable names</param>
 /// <param name="configuration">the configuration</param>
 /// <param name="schedulingService">The scheduling service.</param>
 /// <param name="engineURI">The engine URI.</param>
 /// <param name="patternNodeFactory">The pattern node factory.</param>
 /// <param name="namedWindowMgmtService">The named window service.</param>
 /// <param name="contextManagementService">The context management service.</param>
 /// <param name="exprDeclaredService">The expr declared service.</param>
 /// <param name="contextDescriptor">optional context description</param>
 /// <param name="tableService">The table service.</param>
 public StatementSpecMapContext(
     IContainer container,
     EngineImportService engineImportService,
     VariableService variableService,
     ConfigurationInformation configuration,
     SchedulingService schedulingService,
     string engineURI,
     PatternNodeFactory patternNodeFactory,
     NamedWindowMgmtService namedWindowMgmtService,
     ContextManagementService contextManagementService,
     ExprDeclaredService exprDeclaredService,
     ContextDescriptor contextDescriptor,
     TableService tableService)
 {
     Container                = container;
     PlugInAggregations       = new LazyAllocatedMap <ConfigurationPlugInAggregationMultiFunction, PlugInAggregationMultiFunctionFactory>();
     TableExpressions         = new HashSet <ExprTableAccessNode>();
     EngineImportService      = engineImportService;
     VariableService          = variableService;
     Configuration            = configuration;
     VariableNames            = new HashSet <string>();
     SchedulingService        = schedulingService;
     EngineURI                = engineURI;
     PatternNodeFactory       = patternNodeFactory;
     NamedWindowMgmtService   = namedWindowMgmtService;
     ContextManagementService = contextManagementService;
     ExprDeclaredService      = exprDeclaredService;
     ContextDescriptor        = contextDescriptor;
     TableService             = tableService;
 }
コード例 #3
0
        public static StatementSpecRaw CompileEPL(
            string eplStatement,
            string eplStatementForErrorMsg,
            bool addPleaseCheck,
            string statementName,
            SelectClauseStreamSelectorEnum defaultStreamSelector,
            EngineImportService engineImportService,
            VariableService variableService,
            SchedulingService schedulingService,
            string engineURI,
            ConfigurationInformation configSnapshot,
            PatternNodeFactory patternNodeFactory,
            ContextManagementService contextManagementService,
            ExprDeclaredService exprDeclaredService,
            TableService tableService)
        {
            if (Log.IsDebugEnabled)
            {
                Log.Debug(".createEPLStmt statementName=" + statementName + " eplStatement=" + eplStatement);
            }

            ParseResult parseResult = ParseHelper.Parse(
                eplStatement, eplStatementForErrorMsg, addPleaseCheck, EPLParseRule, true);
            ITree ast = parseResult.Tree;

            var walker = new EPLTreeWalkerListener(
                parseResult.TokenStream, engineImportService, variableService, schedulingService, defaultStreamSelector,
                engineURI, configSnapshot, patternNodeFactory, contextManagementService, parseResult.Scripts,
                exprDeclaredService, tableService);

            try
            {
                ParseHelper.Walk(ast, walker, eplStatement, eplStatementForErrorMsg);
            }
            catch (ASTWalkException ex)
            {
                Log.Error(".createEPL Error validating expression", ex);
                throw new EPStatementException(ex.Message, ex, eplStatementForErrorMsg);
            }
            catch (EPStatementSyntaxException ex)
            {
                throw;
            }
            catch (Exception ex)
            {
                string message = "Error in expression";
                Log.Debug(message, ex);
                throw new EPStatementException(GetNullableErrortext(message, ex.Message), ex, eplStatementForErrorMsg);
            }

            if (Log.IsDebugEnabled)
            {
                ASTUtil.DumpAST(ast);
            }

            StatementSpecRaw raw = walker.StatementSpec;

            raw.ExpressionNoAnnotations = parseResult.ExpressionWithoutAnnotations;
            return(raw);
        }
コード例 #4
0
 public EPStatementDestroyCallbackContext(ContextManagementService contextManagementService, string optionalContextName, string statementName, string statementId)
 {
     _contextManagementService = contextManagementService;
     _contextName   = optionalContextName;
     _statementName = statementName;
     _statementId   = statementId;
 }
コード例 #5
0
 public StatementContextEngineServices(
     IContainer container,
     String engineURI,
     EventAdapterService eventAdapterService,
     NamedWindowMgmtService namedWindowMgmtService,
     VariableService variableService,
     TableService tableService,
     EngineSettingsService engineSettingsService,
     ValueAddEventService valueAddEventService,
     ConfigurationInformation configSnapshot,
     MetricReportingServiceSPI metricReportingService,
     ViewService viewService,
     ExceptionHandlingService exceptionHandlingService,
     ExpressionResultCacheService expressionResultCacheService,
     StatementEventTypeRef statementEventTypeRef,
     TableExprEvaluatorContext tableExprEvaluatorContext,
     EngineLevelExtensionServicesContext engineLevelExtensionServicesContext,
     RegexHandlerFactory regexHandlerFactory,
     StatementLockFactory statementLockFactory,
     ContextManagementService contextManagementService,
     ViewServicePreviousFactory viewServicePreviousFactory,
     EventTableIndexService eventTableIndexService,
     PatternNodeFactory patternNodeFactory,
     FilterBooleanExpressionFactory filterBooleanExpressionFactory,
     TimeSourceService timeSourceService,
     EngineImportService engineImportService,
     AggregationFactoryFactory aggregationFactoryFactory,
     SchedulingService schedulingService,
     ExprDeclaredService exprDeclaredService)
 {
     Container                           = container;
     EngineURI                           = engineURI;
     EventAdapterService                 = eventAdapterService;
     NamedWindowMgmtService              = namedWindowMgmtService;
     VariableService                     = variableService;
     TableService                        = tableService;
     EngineSettingsService               = engineSettingsService;
     ValueAddEventService                = valueAddEventService;
     ConfigSnapshot                      = configSnapshot;
     MetricReportingService              = metricReportingService;
     ViewService                         = viewService;
     ExceptionHandlingService            = exceptionHandlingService;
     ExpressionResultCacheService        = expressionResultCacheService;
     StatementEventTypeRef               = statementEventTypeRef;
     TableExprEvaluatorContext           = tableExprEvaluatorContext;
     EngineLevelExtensionServicesContext = engineLevelExtensionServicesContext;
     RegexHandlerFactory                 = regexHandlerFactory;
     StatementLockFactory                = statementLockFactory;
     ContextManagementService            = contextManagementService;
     ViewServicePreviousFactory          = viewServicePreviousFactory;
     EventTableIndexService              = eventTableIndexService;
     PatternNodeFactory                  = patternNodeFactory;
     FilterBooleanExpressionFactory      = filterBooleanExpressionFactory;
     TimeSourceService                   = timeSourceService;
     EngineImportService                 = engineImportService;
     AggregationFactoryFactory           = aggregationFactoryFactory;
     SchedulingService                   = schedulingService;
     ExprDeclaredService                 = exprDeclaredService;
 }
コード例 #6
0
 public EPPreparedQueryResult Execute(
     FAFQueryMethodSelect select,
     ContextPartitionSelector[] contextPartitionSelectors,
     FAFQueryMethodAssignerSetter assignerSetter,
     ContextManagementService contextManagementService)
 {
     throw new UnsupportedOperationException("Context with join is not supported");
 }
コード例 #7
0
        public EPPreparedQueryResult Execute(
            FAFQueryMethodSelect select,
            ContextPartitionSelector[] contextPartitionSelectors,
            FAFQueryMethodAssignerSetter assignerSetter,
            ContextManagementService contextManagementService)
        {
            var processor = select.Processors[0];

            var singleSelector = contextPartitionSelectors != null && contextPartitionSelectors.Length > 0
                ? contextPartitionSelectors[0]
                : null;
            var agentInstanceIds = AgentInstanceIds(processor, singleSelector, contextManagementService);

            IList<ContextPartitionResult> contextPartitionResults = new List<ContextPartitionResult>();
            foreach (var agentInstanceId in agentInstanceIds) {
                var processorInstance = processor.GetProcessorInstanceContextById(agentInstanceId);
                if (processorInstance != null) {
                    var coll = processorInstance.SnapshotBestEffort(select.QueryGraph, select.Annotations);
                    contextPartitionResults.Add(
                        new ContextPartitionResult(coll, processorInstance.AgentInstanceContext));
                }
            }

            // process context partitions
            var events = new ArrayDeque<EventBean[]>();
            ResultSetProcessor resultSetProcessor = null;
            foreach (var contextPartitionResult in contextPartitionResults) {
                if (resultSetProcessor == null) {
                    resultSetProcessor = ProcessorWithAssign(
                        select.ResultSetProcessorFactoryProvider,
                        contextPartitionResult.Context,
                        assignerSetter,
                        select.TableAccesses);
                }

                var snapshot = contextPartitionResult.Events;
                if (select.WhereClause != null) {
                    snapshot = Filtered(
                        snapshot,
                        select.WhereClause,
                        contextPartitionResult.Context);
                }

                var rows = snapshot.ToArray();
                resultSetProcessor.SetAgentInstanceContext(contextPartitionResult.Context);
                var results = resultSetProcessor.ProcessViewResult(rows, null, true);
                if (results != null && results.First != null && results.First.Length > 0) {
                    events.Add(results.First);
                }
            }

            var distinct = EventBeanUtility.GetDistinctByProp(
                EventBeanUtility.Flatten(events),
                select.EventBeanReaderDistinct);
            return new EPPreparedQueryResult(select.EventType, distinct);
        }
コード例 #8
0
 protected internal static ICollection<int> AgentInstanceIds(
     FireAndForgetProcessor processor,
     ContextPartitionSelector optionalSelector,
     ContextManagementService contextManagementService)
 {
     var contextManager = contextManagementService.GetContextManager(
         processor.ContextDeploymentId,
         processor.ContextName);
     return contextManager.Realization.GetAgentInstanceIds(
         optionalSelector == null ? ContextPartitionSelectorAll.INSTANCE : optionalSelector);
 }
コード例 #9
0
 public static Action New(
     ContextManagementService contextManagementService,
     string optionalContextName,
     string statementName,
     string statementId)
 {
     return(new EPStatementDestroyCallbackContext(
                contextManagementService,
                optionalContextName,
                statementName,
                statementId).Destroy);
 }
コード例 #10
0
        private void RunAssertionLifecycle(EPServiceProvider epService)
        {
            string epl = "@Name('context') create context NineToFive as start (0, 9, *, *, *) end (0, 17, *, *, *)";
            EPServiceProviderSPI     spi               = (EPServiceProviderSPI)epService;
            ContextManagementService ctxMgmtService    = spi.ContextManagementService;
            SchedulingService        schedulingService = spi.SchedulingService;

            Assert.AreEqual(0, ctxMgmtService.ContextCount);
            Assert.AreEqual(0, schedulingService.ScheduleHandleCount);

            // create and destroy
            EPStatement stmtContext = epService.EPAdministrator.CreateEPL(epl);

            Assert.AreEqual(1, ctxMgmtService.ContextCount);
            Assert.AreEqual(0, schedulingService.ScheduleHandleCount);

            stmtContext.Dispose();
            Assert.AreEqual(0, ctxMgmtService.ContextCount);

            // create context, create statement, destroy statement, destroy context
            stmtContext = epService.EPAdministrator.CreateEPL(epl);
            Assert.AreEqual(1, ctxMgmtService.ContextCount);

            EPStatement stmt = epService.EPAdministrator.CreateEPL("@Name('C') context NineToFive select * from SupportBean");

            Assert.AreEqual(1, schedulingService.ScheduleHandleCount);

            stmt.Dispose();
            Assert.AreEqual(0, schedulingService.ScheduleHandleCount);

            stmtContext.Dispose();
            Assert.AreEqual(0, ctxMgmtService.ContextCount);

            // create same context
            epService.EPAdministrator.CreateEPL(epl);
            epService.EPAdministrator.CreateEPL("@Name('C') context NineToFive select * from SupportBean");
            epService.EPAdministrator.CreateEPL("@Name('D') context NineToFive select * from SupportBean");
            epService.EPAdministrator.DestroyAllStatements();
            Assert.AreEqual(0, ctxMgmtService.ContextCount);
            Assert.AreEqual(0, schedulingService.ScheduleHandleCount);

            epService.EPAdministrator.DestroyAllStatements();
        }
コード例 #11
0
        public EPPreparedQueryResult Execute(
            FAFQueryMethodSelect select,
            ContextPartitionSelector[] contextPartitionSelectors,
            FAFQueryMethodAssignerSetter assignerSetter,
            ContextManagementService contextManagementService)
        {
            FireAndForgetProcessor processor = select.Processors[0];

            ContextPartitionSelector singleSelector =
                contextPartitionSelectors != null && contextPartitionSelectors.Length > 0
                    ? contextPartitionSelectors[0]
                    : null;
            ICollection<int> agentInstanceIds = AgentInstanceIds(processor, singleSelector, contextManagementService);

            ICollection<EventBean> events = new ArrayDeque<EventBean>();
            AgentInstanceContext agentInstanceContext = null;
            foreach (int agentInstanceId in agentInstanceIds) {
                FireAndForgetInstance processorInstance = processor.GetProcessorInstanceContextById(agentInstanceId);
                if (processorInstance != null) {
                    agentInstanceContext = processorInstance.AgentInstanceContext;
                    ICollection<EventBean> coll = processorInstance.SnapshotBestEffort(
                        select.QueryGraph,
                        select.Annotations);
                    events.AddAll(coll);
                }
            }

            // get RSP
            ResultSetProcessor resultSetProcessor = ProcessorWithAssign(
                select.ResultSetProcessorFactoryProvider,
                agentInstanceContext,
                assignerSetter,
                select.TableAccesses,
                select.Subselects);

            if (select.WhereClause != null) {
                events = Filtered(events, select.WhereClause, agentInstanceContext);
            }

            return ProcessedNonJoin(resultSetProcessor, events, select.DistinctKeyGetter);
        }
コード例 #12
0
        public void TestLifecycle()
        {
            String epl = "@Name('context') create context NineToFive as start (0, 9, *, *, *) end (0, 17, *, *, *)";
            ContextManagementService ctxMgmtService    = _spi.ContextManagementService;
            SchedulingService        schedulingService = _spi.SchedulingService;

            Assert.AreEqual(0, ctxMgmtService.ContextCount);
            Assert.AreEqual(0, schedulingService.ScheduleHandleCount);

            // create and destroy
            EPStatement stmtContext = _epService.EPAdministrator.CreateEPL(epl);

            Assert.AreEqual(1, ctxMgmtService.ContextCount);
            Assert.AreEqual(0, schedulingService.ScheduleHandleCount);

            stmtContext.Dispose();
            Assert.AreEqual(0, ctxMgmtService.ContextCount);

            // create context, create statement, destroy statement, destroy context
            stmtContext = _epService.EPAdministrator.CreateEPL(epl);
            Assert.AreEqual(1, ctxMgmtService.ContextCount);

            EPStatement stmt = _epService.EPAdministrator.CreateEPL("@Name('C') context NineToFive select * from SupportBean");

            Assert.AreEqual(1, schedulingService.ScheduleHandleCount);

            stmt.Dispose();
            Assert.AreEqual(0, schedulingService.ScheduleHandleCount);

            stmtContext.Dispose();
            Assert.AreEqual(0, ctxMgmtService.ContextCount);

            // create same context
            _epService.EPAdministrator.CreateEPL(epl);
            _epService.EPAdministrator.CreateEPL("@Name('C') context NineToFive select * from SupportBean");
            _epService.EPAdministrator.CreateEPL("@Name('D') context NineToFive select * from SupportBean");
            _epService.EPAdministrator.DestroyAllStatements();
            Assert.AreEqual(0, ctxMgmtService.ContextCount);
            Assert.AreEqual(0, schedulingService.ScheduleHandleCount);
        }
コード例 #13
0
        public void TestStartTurnedOn()
        {
            ContextManagementService ctxMgmtService = _spi.ContextManagementService;

            Assert.AreEqual(0, ctxMgmtService.ContextCount);

            SendTimeEvent("2002-05-1 9:15:00.000");
            EPStatement stmtContext = _epService.EPAdministrator.CreateEPL("@Name('context') create context NineToFive as start (0, 9, *, *, *) end (0, 17, *, *, *)");

            Assert.AreEqual(1, ctxMgmtService.ContextCount);

            EPStatement stmtOne = _epService.EPAdministrator.CreateEPL("@Name('A') context NineToFive select * from SupportBean");

            stmtOne.Events += new SupportUpdateListener().Update;

            SendTimeAndAssert("2002-05-1 9:16:00.000", true, 1);
            SendTimeAndAssert("2002-05-1 16:59:59.000", true, 1);
            SendTimeAndAssert("2002-05-1 17:00:00.000", false, 1);

            EPStatement stmtTwo = _epService.EPAdministrator.CreateEPL("@Name('B') context NineToFive select * from SupportBean");

            stmtTwo.Events += new SupportUpdateListener().Update;

            SendTimeAndAssert("2002-05-2 8:59:59.999", false, 2);
            SendTimeAndAssert("2002-05-2 9:15:00.000", true, 2);
            SendTimeAndAssert("2002-05-2 16:59:59.000", true, 2);
            SendTimeAndAssert("2002-05-2 17:00:00.000", false, 2);

            // destroy context before stmts
            stmtContext.Dispose();
            Assert.AreEqual(1, ctxMgmtService.ContextCount);

            stmtTwo.Dispose();
            stmtOne.Dispose();

            // context gone too
            Assert.AreEqual(0, ctxMgmtService.ContextCount);
        }
コード例 #14
0
        public static ICollection <int> GetAgentInstanceIds(
            FireAndForgetProcessor processor,
            ContextPartitionSelector selector,
            ContextManagementService contextManagementService,
            String contextName)
        {
            ICollection <int> agentInstanceIds;

            if (selector == null || selector is ContextPartitionSelectorAll)
            {
                agentInstanceIds = processor.GetProcessorInstancesAll();
            }
            else
            {
                ContextManager contextManager = contextManagementService.GetContextManager(contextName);
                if (contextManager == null)
                {
                    throw new EPException("Context by name '" + contextName + "' could not be found");
                }
                agentInstanceIds = contextManager.GetAgentInstanceIds(selector);
            }
            return(agentInstanceIds);
        }
コード例 #15
0
        public EPPreparedQueryResult Execute(
            AtomicBoolean serviceStatusProvider,
            FAFQueryMethodAssignerSetter assignerSetter,
            ContextPartitionSelector[] contextPartitionSelectors,
            ContextManagementService contextManagementService)
        {
            if (!serviceStatusProvider.Get()) {
                throw FAFQueryMethodUtil.RuntimeDestroyed();
            }

            if (contextPartitionSelectors != null && contextPartitionSelectors.Length != Processors.Length) {
                throw new ArgumentException(
                    "The number of context partition selectors does not match the number of named windows or tables in the from-clause");
            }

            try {
                return SelectExec.Execute(this, contextPartitionSelectors, assignerSetter, contextManagementService);
            }
            finally {
                if (HasTableAccess) {
                    Processors[0].StatementContext.TableExprEvaluatorContext.ReleaseAcquiredLocks();
                }
            }
        }
コード例 #16
0
        // Supplied after construction to avoid circular dependency

        /// <summary>
        /// Constructor - sets up new set of services.
        /// </summary>
        /// <param name="engineURI">is the engine URI</param>
        /// <param name="schedulingService">service to get time and schedule callbacks</param>
        /// <param name="eventAdapterService">service to resolve event types</param>
        /// <param name="engineImportService">is engine imported static func packages and aggregation functions</param>
        /// <param name="engineSettingsService">provides engine settings</param>
        /// <param name="databaseConfigService">service to resolve a database name to database connection factory and configs</param>
        /// <param name="plugInViews">resolves view namespace and name to view factory class</param>
        /// <param name="statementLockFactory">creates statement-level locks</param>
        /// <param name="eventProcessingRWLock">is the engine lock for statement management</param>
        /// <param name="extensionServicesContext">marker interface allows adding additional services</param>
        /// <param name="engineEnvContext">is engine environment/directory information for use with adapters and external env</param>
        /// <param name="statementContextFactory">is the factory to use to create statement context objects</param>
        /// <param name="plugInPatternObjects">resolves plug-in pattern objects</param>
        /// <param name="timerService">is the timer service</param>
        /// <param name="filterService">the filter service</param>
        /// <param name="streamFactoryService">is hooking up filters to streams</param>
        /// <param name="namedWindowMgmtService">The named window MGMT service.</param>
        /// <param name="namedWindowDispatchService">The named window dispatch service.</param>
        /// <param name="variableService">provides access to variable values</param>
        /// <param name="tableService">The table service.</param>
        /// <param name="timeSourceService">time source provider class</param>
        /// <param name="valueAddEventService">handles Update events</param>
        /// <param name="metricsReportingService">for metric reporting</param>
        /// <param name="statementEventTypeRef">statement to event type reference holding</param>
        /// <param name="statementVariableRef">statement to variabke reference holding</param>
        /// <param name="configSnapshot">configuration snapshot</param>
        /// <param name="threadingServiceImpl">engine-level threading services</param>
        /// <param name="internalEventRouter">routing of events</param>
        /// <param name="statementIsolationService">maintains isolation information per statement</param>
        /// <param name="schedulingMgmtService">schedule management for statements</param>
        /// <param name="deploymentStateService">The deployment state service.</param>
        /// <param name="exceptionHandlingService">The exception handling service.</param>
        /// <param name="patternNodeFactory">The pattern node factory.</param>
        /// <param name="eventTypeIdGenerator">The event type id generator.</param>
        /// <param name="statementMetadataFactory">The statement metadata factory.</param>
        /// <param name="contextManagementService">The context management service.</param>
        /// <param name="patternSubexpressionPoolSvc">The pattern subexpression pool SVC.</param>
        /// <param name="matchRecognizeStatePoolEngineSvc">The match recognize state pool engine SVC.</param>
        /// <param name="dataFlowService">The data flow service.</param>
        /// <param name="exprDeclaredService">The expr declared service.</param>
        /// <param name="contextControllerFactoryFactorySvc">The context controller factory factory SVC.</param>
        /// <param name="contextManagerFactoryService">The context manager factory service.</param>
        /// <param name="epStatementFactory">The ep statement factory.</param>
        /// <param name="regexHandlerFactory">The regex handler factory.</param>
        /// <param name="viewableActivatorFactory">The viewable activator factory.</param>
        /// <param name="filterNonPropertyRegisteryService">The filter non property registery service.</param>
        /// <param name="resultSetProcessorHelperFactory">The result set processor helper factory.</param>
        /// <param name="viewServicePreviousFactory">The view service previous factory.</param>
        /// <param name="eventTableIndexService">The event table index service.</param>
        /// <param name="epRuntimeIsolatedFactory">The ep runtime isolated factory.</param>
        /// <param name="filterBooleanExpressionFactory">The filter boolean expression factory.</param>
        /// <param name="dataCacheFactory">The data cache factory.</param>
        /// <param name="multiMatchHandlerFactory">The multi match handler factory.</param>
        /// <param name="namedWindowConsumerMgmtService">The named window consumer MGMT service.</param>
        /// <param name="aggregationFactoryFactory"></param>
        /// <param name="scriptingService">The scripting service.</param>
        public EPServicesContext(
            string engineURI,
            SchedulingServiceSPI schedulingService,
            EventAdapterService eventAdapterService,
            EngineImportService engineImportService,
            EngineSettingsService engineSettingsService,
            DatabaseConfigService databaseConfigService,
            PluggableObjectCollection plugInViews,
            StatementLockFactory statementLockFactory,
            IReaderWriterLock eventProcessingRWLock,
            EngineLevelExtensionServicesContext extensionServicesContext,
            Directory engineEnvContext,
            StatementContextFactory statementContextFactory,
            PluggableObjectCollection plugInPatternObjects,
            TimerService timerService,
            FilterServiceSPI filterService,
            StreamFactoryService streamFactoryService,
            NamedWindowMgmtService namedWindowMgmtService,
            NamedWindowDispatchService namedWindowDispatchService,
            VariableService variableService,
            TableService tableService,
            TimeSourceService timeSourceService,
            ValueAddEventService valueAddEventService,
            MetricReportingServiceSPI metricsReportingService,
            StatementEventTypeRef statementEventTypeRef,
            StatementVariableRef statementVariableRef,
            ConfigurationInformation configSnapshot,
            ThreadingService threadingServiceImpl,
            InternalEventRouterImpl internalEventRouter,
            StatementIsolationService statementIsolationService,
            SchedulingMgmtService schedulingMgmtService,
            DeploymentStateService deploymentStateService,
            ExceptionHandlingService exceptionHandlingService,
            PatternNodeFactory patternNodeFactory,
            EventTypeIdGenerator eventTypeIdGenerator,
            StatementMetadataFactory statementMetadataFactory,
            ContextManagementService contextManagementService,
            PatternSubexpressionPoolEngineSvc patternSubexpressionPoolSvc,
            MatchRecognizeStatePoolEngineSvc matchRecognizeStatePoolEngineSvc,
            DataFlowService dataFlowService,
            ExprDeclaredService exprDeclaredService,
            ContextControllerFactoryFactorySvc contextControllerFactoryFactorySvc,
            ContextManagerFactoryService contextManagerFactoryService,
            EPStatementFactory epStatementFactory,
            RegexHandlerFactory regexHandlerFactory,
            ViewableActivatorFactory viewableActivatorFactory,
            FilterNonPropertyRegisteryService filterNonPropertyRegisteryService,
            ResultSetProcessorHelperFactory resultSetProcessorHelperFactory,
            ViewServicePreviousFactory viewServicePreviousFactory,
            EventTableIndexService eventTableIndexService,
            EPRuntimeIsolatedFactory epRuntimeIsolatedFactory,
            FilterBooleanExpressionFactory filterBooleanExpressionFactory,
            DataCacheFactory dataCacheFactory,
            MultiMatchHandlerFactory multiMatchHandlerFactory,
            NamedWindowConsumerMgmtService namedWindowConsumerMgmtService,
            AggregationFactoryFactory aggregationFactoryFactory,
            ScriptingService scriptingService)
        {
            EngineURI             = engineURI;
            SchedulingService     = schedulingService;
            EventAdapterService   = eventAdapterService;
            EngineImportService   = engineImportService;
            EngineSettingsService = engineSettingsService;
            DatabaseRefService    = databaseConfigService;
            FilterService         = filterService;
            TimerService          = timerService;
            DispatchService       = DispatchServiceProvider.NewService();
            ViewService           = ViewServiceProvider.NewService();
            StreamService         = streamFactoryService;
            PlugInViews           = plugInViews;
            StatementLockFactory  = statementLockFactory;
            EventProcessingRWLock = eventProcessingRWLock;
            EngineLevelExtensionServicesContext = extensionServicesContext;
            EngineEnvContext           = engineEnvContext;
            StatementContextFactory    = statementContextFactory;
            PlugInPatternObjects       = plugInPatternObjects;
            NamedWindowMgmtService     = namedWindowMgmtService;
            NamedWindowDispatchService = namedWindowDispatchService;
            VariableService            = variableService;
            TableService                     = tableService;
            TimeSource                       = timeSourceService;
            ValueAddEventService             = valueAddEventService;
            MetricsReportingService          = metricsReportingService;
            StatementEventTypeRefService     = statementEventTypeRef;
            ConfigSnapshot                   = configSnapshot;
            ThreadingService                 = threadingServiceImpl;
            InternalEventRouter              = internalEventRouter;
            StatementIsolationService        = statementIsolationService;
            SchedulingMgmtService            = schedulingMgmtService;
            StatementVariableRefService      = statementVariableRef;
            DeploymentStateService           = deploymentStateService;
            ExceptionHandlingService         = exceptionHandlingService;
            PatternNodeFactory               = patternNodeFactory;
            EventTypeIdGenerator             = eventTypeIdGenerator;
            StatementMetadataFactory         = statementMetadataFactory;
            ContextManagementService         = contextManagementService;
            PatternSubexpressionPoolSvc      = patternSubexpressionPoolSvc;
            MatchRecognizeStatePoolEngineSvc = matchRecognizeStatePoolEngineSvc;
            DataFlowService                  = dataFlowService;
            ExprDeclaredService              = exprDeclaredService;
            ExpressionResultCacheSharable    = new ExpressionResultCacheService(
                configSnapshot.EngineDefaults.ExecutionConfig.DeclaredExprValueCacheSize);
            ContextControllerFactoryFactorySvc = contextControllerFactoryFactorySvc;
            ContextManagerFactoryService       = contextManagerFactoryService;
            EpStatementFactory                = epStatementFactory;
            RegexHandlerFactory               = regexHandlerFactory;
            ViewableActivatorFactory          = viewableActivatorFactory;
            FilterNonPropertyRegisteryService = filterNonPropertyRegisteryService;
            ResultSetProcessorHelperFactory   = resultSetProcessorHelperFactory;
            ViewServicePreviousFactory        = viewServicePreviousFactory;
            EventTableIndexService            = eventTableIndexService;
            EpRuntimeIsolatedFactory          = epRuntimeIsolatedFactory;
            FilterBooleanExpressionFactory    = filterBooleanExpressionFactory;
            DataCacheFactory               = dataCacheFactory;
            MultiMatchHandlerFactory       = multiMatchHandlerFactory;
            NamedWindowConsumerMgmtService = namedWindowConsumerMgmtService;
            AggregationFactoryFactory      = aggregationFactoryFactory;
            ScriptingService               = scriptingService;
        }
コード例 #17
0
ファイル: FAFQueryMethodEnv.cs プロジェクト: lanicon/nesper
 public FAFQueryMethodEnv(ContextManagementService contextManagementService)
 {
     this.contextManagementService = contextManagementService;
 }
コード例 #18
0
 public StatementContextRuntimeServices(
     IContainer container,
     ContextManagementService contextManagementService,
     ContextServiceFactory contextServiceFactory,
     DatabaseConfigServiceRuntime databaseConfigService,
     DataFlowFilterServiceAdapter dataFlowFilterServiceAdapter,
     EPDataFlowServiceImpl dataflowService,
     string runtimeURI,
     INamingContext runtimeEnvContext,
     ImportServiceRuntime importServiceRuntime,
     RuntimeSettingsService runtimeSettingsService,
     RuntimeExtensionServices runtimeExtensionServices,
     object epRuntime,
     EPRenderEventService epRuntimeRenderEvent,
     EventServiceSendEventCommon eventServiceSendEventInternal,
     EPRuntimeEventProcessWrapped epRuntimeEventProcessWrapped,
     EventBeanService eventBeanService,
     EventBeanTypedEventFactory eventBeanTypedEventFactory,
     EventTableIndexService eventTableIndexService,
     EventTypeAvroHandler eventTypeAvroHandler,
     PathRegistry<string, EventType> eventTypePathRegistry,
     EventTypeRepositoryImpl eventTypeRepositoryPreconfigured,
     EventTypeResolvingBeanFactory eventTypeResolvingBeanFactory,
     ExceptionHandlingService exceptionHandlingService,
     ExpressionResultCacheService expressionResultCacheService,
     FilterBooleanExpressionFactory filterBooleanExpressionFactory,
     FilterSharedBoolExprRepository filterSharedBoolExprRepository,
     FilterSharedLookupableRepository filterSharedLookupableRepository,
     HistoricalDataCacheFactory historicalDataCacheFactory,
     InternalEventRouter internalEventRouter,
     MetricReportingService metricReportingService,
     NamedWindowConsumerManagementService namedWindowConsumerManagementService,
     NamedWindowManagementService namedWindowManagementService,
     PathRegistry<string, ContextMetaData> pathContextRegistry,
     PathRegistry<string, NamedWindowMetaData> pathNamedWindowRegistry,
     RowRecogStateRepoFactory rowRecogStateRepoFactory,
     ResultSetProcessorHelperFactory resultSetProcessorHelperFactory,
     StatementAgentInstanceLockFactory statementAgentInstanceLockFactory,
     StatementResourceHolderBuilder statementResourceHolderBuilder,
     TableExprEvaluatorContext tableExprEvaluatorContext,
     TableManagementService tableManagementService,
     VariableManagementService variableManagementService,
     ViewFactoryService viewFactoryService,
     ViewServicePreviousFactory viewServicePreviousFactory)
 {
     Container = container;
     ContextManagementService = contextManagementService;
     ContextServiceFactory = contextServiceFactory;
     DatabaseConfigService = databaseConfigService;
     DataFlowFilterServiceAdapter = dataFlowFilterServiceAdapter;
     DataflowService = dataflowService;
     RuntimeURI = runtimeURI;
     RuntimeEnvContext = runtimeEnvContext;
     ImportServiceRuntime = importServiceRuntime;
     RuntimeSettingsService = runtimeSettingsService;
     RuntimeExtensionServices = runtimeExtensionServices;
     Runtime = epRuntime;
     EPRuntimeRenderEvent = epRuntimeRenderEvent;
     EventServiceSendEventInternal = eventServiceSendEventInternal;
     EPRuntimeEventProcessWrapped = epRuntimeEventProcessWrapped;
     EventBeanService = eventBeanService;
     EventBeanTypedEventFactory = eventBeanTypedEventFactory;
     EventTableIndexService = eventTableIndexService;
     EventTypeAvroHandler = eventTypeAvroHandler;
     EventTypePathRegistry = eventTypePathRegistry;
     EventTypeRepositoryPreconfigured = eventTypeRepositoryPreconfigured;
     EventTypeResolvingBeanFactory = eventTypeResolvingBeanFactory;
     ExceptionHandlingService = exceptionHandlingService;
     ExpressionResultCacheService = expressionResultCacheService;
     FilterBooleanExpressionFactory = filterBooleanExpressionFactory;
     FilterSharedBoolExprRepository = filterSharedBoolExprRepository;
     FilterSharedLookupableRepository = filterSharedLookupableRepository;
     HistoricalDataCacheFactory = historicalDataCacheFactory;
     InternalEventRouter = internalEventRouter;
     MetricReportingService = metricReportingService;
     NamedWindowConsumerManagementService = namedWindowConsumerManagementService;
     NamedWindowManagementService = namedWindowManagementService;
     PathContextRegistry = pathContextRegistry;
     PathNamedWindowRegistry = pathNamedWindowRegistry;
     RowRecogStateRepoFactory = rowRecogStateRepoFactory;
     ResultSetProcessorHelperFactory = resultSetProcessorHelperFactory;
     StatementAgentInstanceLockFactory = statementAgentInstanceLockFactory;
     StatementResourceHolderBuilder = statementResourceHolderBuilder;
     TableExprEvaluatorContext = tableExprEvaluatorContext;
     TableManagementService = tableManagementService;
     VariableManagementService = variableManagementService;
     ViewFactoryService = viewFactoryService;
     ViewServicePreviousFactory = viewServicePreviousFactory;
 }
コード例 #19
0
        public override EPStatementStartResult StartInternal(EPServicesContext services, StatementContext statementContext, bool isNewStatement, bool isRecoveringStatement, bool isRecoveringResilient)
        {
            var createDesc = StatementSpec.CreateVariableDesc;

            VariableServiceUtil.CheckAlreadyDeclaredTable(createDesc.VariableName, services.TableService);

            // Get assignment value
            Object value = null;

            if (createDesc.Assignment != null)
            {
                // Evaluate assignment expression
                var typeService          = new StreamTypeServiceImpl(new EventType[0], new String[0], new bool[0], services.EngineURI, false);
                var evaluatorContextStmt = new ExprEvaluatorContextStatement(statementContext, false);
                var validationContext    = new ExprValidationContext(
                    typeService,
                    statementContext.MethodResolutionService, null,
                    statementContext.SchedulingService,
                    statementContext.VariableService,
                    statementContext.TableService, evaluatorContextStmt,
                    statementContext.EventAdapterService,
                    statementContext.StatementName,
                    statementContext.StatementId,
                    statementContext.Annotations,
                    statementContext.ContextDescriptor,
                    statementContext.ScriptingService,
                    false, false, false, false, null, false);
                var validated = ExprNodeUtility.GetValidatedSubtree(ExprNodeOrigin.VARIABLEASSIGN, createDesc.Assignment, validationContext);
                value = validated.ExprEvaluator.Evaluate(new EvaluateParams(null, true, evaluatorContextStmt));
            }

            // Create variable
            try
            {
                services.VariableService.CreateNewVariable(
                    StatementSpec.OptionalContextName,
                    createDesc.VariableName,
                    createDesc.VariableType,
                    createDesc.IsConstant,
                    createDesc.IsArray,
                    createDesc.IsArrayOfPrimitive,
                    value,
                    services.EngineImportService);
            }
            catch (VariableExistsException ex)
            {
                // for new statement we don't allow creating the same variable
                if (isNewStatement)
                {
                    throw new ExprValidationException("Cannot create variable: " + ex.Message, ex);
                }
            }
            catch (VariableDeclarationException ex)
            {
                throw new ExprValidationException("Cannot create variable: " + ex.Message, ex);
            }

            var destroyMethod = new EPStatementDestroyCallbackList();

            destroyMethod.AddCallback(
                () =>
            {
                try
                {
                    services.StatementVariableRefService.RemoveReferencesStatement(statementContext.StatementName);
                }
                catch (Exception ex)
                {
                    Log.Error("Error removing variable '" + createDesc.VariableName + "': " + ex.Message);
                }
            });

            var stopMethod = new EPStatementStopMethod(() => { });

            VariableMetaData variableMetaData = services.VariableService.GetVariableMetaData(createDesc.VariableName);
            Viewable         outputView;

            if (StatementSpec.OptionalContextName != null)
            {
                EventType eventType      = CreateVariableView.GetEventType(statementContext.StatementId, services.EventAdapterService, variableMetaData);
                var       contextFactory = new StatementAgentInstanceFactoryCreateVariable(statementContext, services, variableMetaData, eventType);
                var       mergeView      = new ContextMergeView(eventType);
                outputView = mergeView;
                var statement = new ContextManagedStatementCreateVariableDesc(StatementSpec, statementContext, mergeView, contextFactory);
                services.ContextManagementService.AddStatement(StatementSpec.OptionalContextName, statement, isRecoveringResilient);

                ContextManagementService contextManagementService = services.ContextManagementService;
                destroyMethod.AddCallback(() => contextManagementService.DestroyedStatement(StatementSpec.OptionalContextName, statementContext.StatementName, statementContext.StatementId));
            }
            else
            {
                // allocate
                services.VariableService.AllocateVariableState(createDesc.VariableName, VariableServiceConstants.NOCONTEXT_AGENTINSTANCEID, statementContext.StatementExtensionServicesContext);
                var createView = new CreateVariableView(statementContext.StatementId, services.EventAdapterService, services.VariableService, createDesc.VariableName, statementContext.StatementResultService);

                services.VariableService.RegisterCallback(createDesc.VariableName, 0, createView.Update);
                statementContext.StatementStopService.StatementStopped +=
                    () => services.VariableService.UnregisterCallback(createDesc.VariableName, 0, createView.Update);

                // Create result set processor, use wildcard selection
                StatementSpec.SelectClauseSpec.SetSelectExprList(new SelectClauseElementWildcard());
                StatementSpec.SelectStreamDirEnum = SelectClauseStreamSelectorEnum.RSTREAM_ISTREAM_BOTH;
                StreamTypeService typeService   = new StreamTypeServiceImpl(new EventType[] { createView.EventType }, new String[] { "create_variable" }, new bool[] { true }, services.EngineURI, false);
                var agentInstanceContext        = GetDefaultAgentInstanceContext(statementContext);
                var resultSetProcessorPrototype = ResultSetProcessorFactoryFactory.GetProcessorPrototype(
                    StatementSpec, statementContext, typeService, null, new bool[0], true, ContextPropertyRegistryImpl.EMPTY_REGISTRY, null, services.ConfigSnapshot);
                var resultSetProcessor = EPStatementStartMethodHelperAssignExpr.GetAssignResultSetProcessor(agentInstanceContext, resultSetProcessorPrototype);

                // Attach output view
                var outputViewFactory = OutputProcessViewFactoryFactory.Make(StatementSpec, services.InternalEventRouter, agentInstanceContext.StatementContext, resultSetProcessor.ResultEventType, null, services.TableService, resultSetProcessorPrototype.ResultSetProcessorFactory.ResultSetProcessorType);
                var outputViewBase    = outputViewFactory.MakeView(resultSetProcessor, agentInstanceContext);
                createView.AddView(outputViewBase);
                outputView = outputViewBase;
            }

            services.StatementVariableRefService.AddReferences(statementContext.StatementName, Collections.SingletonList(createDesc.VariableName), null);

            return(new EPStatementStartResult(outputView, stopMethod, destroyMethod.Destroy));
        }
コード例 #20
0
        public EPPreparedQueryResult Execute(
            FAFQueryMethodSelect select,
            ContextPartitionSelector[] contextPartitionSelectors,
            FAFQueryMethodAssignerSetter assignerSetter,
            ContextManagementService contextManagementService)
        {
            int numStreams = select.Processors.Length;
            ICollection<EventBean>[] snapshots = new ICollection<EventBean>[numStreams];

            AgentInstanceContext agentInstanceContext = null;
            Viewable[] viewablePerStream = new Viewable[numStreams];

            for (int i = 0; i < numStreams; i++) {
                FireAndForgetProcessor processor = select.Processors[i];
                FireAndForgetInstance processorInstance = processor.ProcessorInstanceNoContext;
                snapshots[i] = Snapshot(
                    select.ConsumerFilters[i],
                    processorInstance,
                    select.QueryGraph,
                    select.Annotations);
                agentInstanceContext = processorInstance.AgentInstanceContext;
                viewablePerStream[i] = processorInstance.TailViewInstance;
            }

            // get RSP
            ResultSetProcessor resultSetProcessor = ProcessorWithAssign(
                select.ResultSetProcessorFactoryProvider,
                agentInstanceContext,
                assignerSetter,
                select.TableAccesses,
                select.Subselects);

            // determine join
            JoinSetComposerDesc joinSetComposerDesc = select.JoinSetComposerPrototype.Create(
                viewablePerStream,
                true,
                agentInstanceContext,
                false);
            JoinSetComposer joinComposer = joinSetComposerDesc.JoinSetComposer;

            EventBean[][] oldDataPerStream = new EventBean[numStreams][];
            EventBean[][] newDataPerStream = new EventBean[numStreams][];
            for (int i = 0; i < numStreams; i++) {
                newDataPerStream[i] = snapshots[i].ToArray();
            }

            UniformPair<ISet<MultiKeyArrayOfKeys<EventBean>>> result = joinComposer.Join(
                newDataPerStream,
                oldDataPerStream,
                agentInstanceContext);
            if (joinSetComposerDesc.PostJoinFilterEvaluator != null) {
                JoinSetComposerUtil.Filter(
                    joinSetComposerDesc.PostJoinFilterEvaluator,
                    result.First,
                    true,
                    agentInstanceContext);
            }

            UniformPair<EventBean[]> results = resultSetProcessor.ProcessJoinResult(result.First, null, true);

            EventBean[] distinct = EventBeanUtility.GetDistinctByProp(results.First, select.DistinctKeyGetter);

            return new EPPreparedQueryResult(resultSetProcessor.ResultEventType, distinct);
        }
コード例 #21
0
ファイル: EPServicesContext.cs プロジェクト: lanicon/nesper
 public EPServicesContext(
     IContainer container,
     AggregationServiceFactoryService aggregationServiceFactoryService,
     BeanEventTypeFactoryPrivate beanEventTypeFactoryPrivate,
     BeanEventTypeStemService beanEventTypeStemService,
     ClassForNameProvider classForNameProvider,
     ParentClassLoader classLoaderParent,
     PathRegistry <string, ClassProvided> classProvidedPathRegistry,
     Configuration configSnapshot,
     ContextManagementService contextManagementService,
     PathRegistry <string, ContextMetaData> contextPathRegistry,
     ContextServiceFactory contextServiceFactory,
     EPDataFlowServiceImpl dataflowService,
     DataFlowFilterServiceAdapter dataFlowFilterServiceAdapter,
     DatabaseConfigServiceRuntime databaseConfigServiceRuntime,
     DeploymentLifecycleService deploymentLifecycleService,
     DispatchService dispatchService,
     RuntimeEnvContext runtimeEnvContext,
     RuntimeSettingsService runtimeSettingsService,
     string runtimeURI,
     ImportServiceRuntime importServiceRuntime,
     EPStatementFactory epStatementFactory,
     PathRegistry <string, ExpressionDeclItem> exprDeclaredPathRegistry,
     IReaderWriterLock eventProcessingRWLock,
     EPServicesHA epServicesHA,
     EPRuntimeSPI epRuntime,
     EventBeanService eventBeanService,
     EventBeanTypedEventFactory eventBeanTypedEventFactory,
     EPRenderEventServiceImpl eventRenderer,
     EventSerdeFactory eventSerdeFactory,
     EventTableIndexService eventTableIndexService,
     EventTypeAvroHandler eventTypeAvroHandler,
     EventTypeFactory eventTypeFactory,
     EventTypeIdResolver eventTypeIdResolver,
     PathRegistry <string, EventType> eventTypePathRegistry,
     EventTypeRepositoryImpl eventTypeRepositoryBus,
     EventTypeResolvingBeanFactory eventTypeResolvingBeanFactory,
     EventTypeSerdeRepository eventTypeSerdeRepository,
     ExceptionHandlingService exceptionHandlingService,
     ExpressionResultCacheService expressionResultCacheService,
     FilterBooleanExpressionFactory filterBooleanExpressionFactory,
     FilterServiceSPI filterService,
     FilterSharedBoolExprRepository filterSharedBoolExprRepository,
     FilterSharedLookupableRepository filterSharedLookupableRepository,
     HistoricalDataCacheFactory historicalDataCacheFactory,
     InternalEventRouterImpl internalEventRouter,
     MetricReportingService metricReportingService,
     MultiMatchHandlerFactory multiMatchHandlerFactory,
     NamedWindowConsumerManagementService namedWindowConsumerManagementService,
     NamedWindowDispatchService namedWindowDispatchService,
     NamedWindowFactoryService namedWindowFactoryService,
     NamedWindowManagementService namedWindowManagementService,
     PathRegistry <string, NamedWindowMetaData> namedWindowPathRegistry,
     PatternFactoryService patternFactoryService,
     PatternSubexpressionPoolRuntimeSvc patternSubexpressionPoolEngineSvc,
     ResultSetProcessorHelperFactory resultSetProcessorHelperFactory,
     RowRecogStateRepoFactory rowRecogStateRepoFactory,
     RowRecogStatePoolRuntimeSvc rowRecogStatePoolEngineSvc,
     SchedulingServiceSPI schedulingService,
     PathRegistry <NameAndParamNum, ExpressionScriptProvided> scriptPathRegistry,
     ScriptCompiler scriptCompiler,
     StageRecoveryService stageRecoveryService,
     StatementLifecycleService statementLifecycleService,
     StatementAgentInstanceLockFactory statementAgentInstanceLockFactory,
     StatementResourceHolderBuilder statementResourceHolderBuilder,
     TableExprEvaluatorContext tableExprEvaluatorContext,
     TableManagementService tableManagementService,
     PathRegistry <string, TableMetaData> tablePathRegistry,
     ThreadingService threadingService,
     TimeAbacus timeAbacus,
     TimeSourceService timeSourceService,
     TimerService timerService,
     VariableManagementService variableManagementService,
     PathRegistry <string, VariableMetaData> variablePathRegistry,
     ViewableActivatorFactory viewableActivatorFactory,
     ViewFactoryService viewFactoryService,
     ViewServicePreviousFactory viewServicePreviousFactory,
     XMLFragmentEventTypeFactory xmlFragmentEventTypeFactory)
 {
     _container = container;
     _aggregationServiceFactoryService = aggregationServiceFactoryService;
     _beanEventTypeFactoryPrivate      = beanEventTypeFactoryPrivate;
     _beanEventTypeStemService         = beanEventTypeStemService;
     _classForNameProvider             = classForNameProvider;
     _classLoaderParent            = classLoaderParent;
     _classProvidedPathRegistry    = classProvidedPathRegistry;
     _configSnapshot               = configSnapshot;
     _contextManagementService     = contextManagementService;
     _contextPathRegistry          = contextPathRegistry;
     _contextServiceFactory        = contextServiceFactory;
     _dataflowService              = dataflowService;
     _dataFlowFilterServiceAdapter = dataFlowFilterServiceAdapter;
     _databaseConfigServiceRuntime = databaseConfigServiceRuntime;
     _deploymentLifecycleService   = deploymentLifecycleService;
     _dispatchService              = dispatchService;
     _runtimeEnvContext            = runtimeEnvContext;
     _runtimeSettingsService       = runtimeSettingsService;
     _runtimeUri               = runtimeURI;
     _importServiceRuntime     = importServiceRuntime;
     _epStatementFactory       = epStatementFactory;
     _exprDeclaredPathRegistry = exprDeclaredPathRegistry;
     _eventProcessingRWLock    = eventProcessingRWLock;
     _epServicesHA             = epServicesHA;
     _epRuntime                            = epRuntime;
     _eventBeanService                     = eventBeanService;
     _eventBeanTypedEventFactory           = eventBeanTypedEventFactory;
     _eventRenderer                        = eventRenderer;
     _eventSerdeFactory                    = eventSerdeFactory;
     _eventTableIndexService               = eventTableIndexService;
     _eventTypeAvroHandler                 = eventTypeAvroHandler;
     _eventTypeFactory                     = eventTypeFactory;
     _eventTypeIdResolver                  = eventTypeIdResolver;
     _eventTypePathRegistry                = eventTypePathRegistry;
     _eventTypeRepositoryBus               = eventTypeRepositoryBus;
     _eventTypeResolvingBeanFactory        = eventTypeResolvingBeanFactory;
     _eventTypeSerdeRepository             = eventTypeSerdeRepository;
     _exceptionHandlingService             = exceptionHandlingService;
     _expressionResultCacheService         = expressionResultCacheService;
     _filterBooleanExpressionFactory       = filterBooleanExpressionFactory;
     _filterService                        = filterService;
     _filterSharedBoolExprRepository       = filterSharedBoolExprRepository;
     _filterSharedLookupableRepository     = filterSharedLookupableRepository;
     _historicalDataCacheFactory           = historicalDataCacheFactory;
     _internalEventRouter                  = internalEventRouter;
     _metricReportingService               = metricReportingService;
     _multiMatchHandlerFactory             = multiMatchHandlerFactory;
     _namedWindowConsumerManagementService = namedWindowConsumerManagementService;
     _namedWindowDispatchService           = namedWindowDispatchService;
     _namedWindowFactoryService            = namedWindowFactoryService;
     _namedWindowManagementService         = namedWindowManagementService;
     _namedWindowPathRegistry              = namedWindowPathRegistry;
     _patternFactoryService                = patternFactoryService;
     _patternSubexpressionPoolEngineSvc    = patternSubexpressionPoolEngineSvc;
     _resultSetProcessorHelperFactory      = resultSetProcessorHelperFactory;
     _rowRecogStateRepoFactory             = rowRecogStateRepoFactory;
     _rowRecogStatePoolEngineSvc           = rowRecogStatePoolEngineSvc;
     _schedulingService                    = schedulingService;
     _scriptPathRegistry                   = scriptPathRegistry;
     _stageRecoveryService                 = stageRecoveryService;
     _statementLifecycleService            = statementLifecycleService;
     _statementAgentInstanceLockFactory    = statementAgentInstanceLockFactory;
     _statementResourceHolderBuilder       = statementResourceHolderBuilder;
     _tableExprEvaluatorContext            = tableExprEvaluatorContext;
     _tableManagementService               = tableManagementService;
     _tablePathRegistry                    = tablePathRegistry;
     _threadingService                     = threadingService;
     _timeAbacus                           = timeAbacus;
     _timeSourceService                    = timeSourceService;
     _timerService                         = timerService;
     _variableManagementService            = variableManagementService;
     _variablePathRegistry                 = variablePathRegistry;
     _viewableActivatorFactory             = viewableActivatorFactory;
     _viewFactoryService                   = viewFactoryService;
     _viewServicePreviousFactory           = viewServicePreviousFactory;
     _xmlFragmentEventTypeFactory          = xmlFragmentEventTypeFactory;
     _scriptCompiler                       = scriptCompiler;
 }