Exemple #1
0
        public NamedWindowRootViewInstance(NamedWindowRootView rootView, AgentInstanceContext agentInstanceContext)
        {
            _rootView             = rootView;
            _agentInstanceContext = agentInstanceContext;

            _indexRepository     = new EventTableIndexRepository();
            _tablePerMultiLookup = new Dictionary <SubordWMatchExprLookupStrategy, EventTable[]>();
        }
Exemple #2
0
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="namedWindowName">Name of the named window.</param>
        /// <param name="namedWindowMgmtService">service for dispatching results</param>
        /// <param name="namedWindowDispatchService">The named window dispatch service.</param>
        /// <param name="contextName">Name of the context.</param>
        /// <param name="eventType">the type of event held by the named window</param>
        /// <param name="statementResultService">for coordinating on whether insert and remove stream events should be posted</param>
        /// <param name="revisionProcessor">for revision processing</param>
        /// <param name="eplExpression">epl expression</param>
        /// <param name="statementName">statement name</param>
        /// <param name="isPrioritized">if the engine is running with prioritized execution</param>
        /// <param name="isEnableSubqueryIndexShare">if set to <c>true</c> [is enable subquery index share].</param>
        /// <param name="enableQueryPlanLog">if set to <c>true</c> [enable query plan log].</param>
        /// <param name="metricReportingService">The metric reporting service.</param>
        /// <param name="isBatchingDataWindow">if set to <c>true</c> [is batching data window].</param>
        /// <param name="isVirtualDataWindow">if set to <c>true</c> [is virtual data window].</param>
        /// <param name="optionalUniqueKeyProps">The optional unique key props.</param>
        /// <param name="eventTypeAsName">Name of the event type as.</param>
        /// <param name="statementContextCreateWindow">The statement context create window.</param>
        public NamedWindowProcessor(string namedWindowName, NamedWindowMgmtService namedWindowMgmtService, NamedWindowDispatchService namedWindowDispatchService, string contextName, EventType eventType, StatementResultService statementResultService, ValueAddEventProcessor revisionProcessor, string eplExpression, string statementName, bool isPrioritized, bool isEnableSubqueryIndexShare, bool enableQueryPlanLog, MetricReportingService metricReportingService, bool isBatchingDataWindow, bool isVirtualDataWindow, ICollection <string> optionalUniqueKeyProps, string eventTypeAsName, StatementContext statementContextCreateWindow)
        {
            _namedWindowName              = namedWindowName;
            _contextName                  = contextName;
            _eventType                    = eventType;
            _eplExpression                = eplExpression;
            _statementName                = statementName;
            _isEnableSubqueryIndexShare   = isEnableSubqueryIndexShare;
            _isVirtualDataWindow          = isVirtualDataWindow;
            _optionalUniqueKeyProps       = optionalUniqueKeyProps;
            _eventTypeAsName              = eventTypeAsName;
            _statementContextCreateWindow = statementContextCreateWindow;

            _rootView = new NamedWindowRootView(revisionProcessor, enableQueryPlanLog, metricReportingService, eventType, isBatchingDataWindow, isEnableSubqueryIndexShare, optionalUniqueKeyProps);
            _tailView = namedWindowDispatchService.CreateTailView(eventType, namedWindowMgmtService, namedWindowDispatchService, statementResultService, revisionProcessor, isPrioritized, isBatchingDataWindow, contextName, statementContextCreateWindow.TimeSourceService, statementContextCreateWindow.ConfigSnapshot.EngineDefaults.ThreadingConfig);
        }
        public NamedWindowRootViewInstance(NamedWindowRootView rootView, AgentInstanceContext agentInstanceContext, EventTableIndexMetadata eventTableIndexMetadata)
        {
            _rootView             = rootView;
            _agentInstanceContext = agentInstanceContext;

            _indexRepository = new EventTableIndexRepository();
            foreach (KeyValuePair <IndexMultiKey, EventTableIndexMetadataEntry> entry in eventTableIndexMetadata.Indexes)
            {
                if (entry.Value.QueryPlanIndexItem != null)
                {
                    EventTable index = EventTableUtil.BuildIndex(agentInstanceContext, 0, entry.Value.QueryPlanIndexItem, rootView.EventType, true, entry.Key.IsUnique, entry.Value.OptionalIndexName, null, false);
                    _indexRepository.AddIndex(entry.Key, new EventTableIndexRepositoryEntry(entry.Value.OptionalIndexName, index));
                }
            }

            _tablePerMultiLookup = new Dictionary <SubordWMatchExprLookupStrategy, EventTable[]>();
        }
Exemple #4
0
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="namedWindowName">Name of the named window.</param>
        /// <param name="namedWindowService">service for dispatching results</param>
        /// <param name="contextName">Name of the context.</param>
        /// <param name="singleInstanceContext">if set to <c>true</c> [single instance context].</param>
        /// <param name="eventType">the type of event held by the named window</param>
        /// <param name="statementResultService">for coordinating on whether insert and remove stream events should be posted</param>
        /// <param name="revisionProcessor">for revision processing</param>
        /// <param name="eplExpression">epl expression</param>
        /// <param name="statementName">statement name</param>
        /// <param name="isPrioritized">if the engine is running with prioritized execution</param>
        /// <param name="isEnableSubqueryIndexShare">if set to <c>true</c> [is enable subquery index share].</param>
        /// <param name="enableQueryPlanLog">if set to <c>true</c> [enable query plan log].</param>
        /// <param name="metricReportingService">The metric reporting service.</param>
        /// <param name="isBatchingDataWindow">if set to <c>true</c> [is batching data window].</param>
        /// <param name="isVirtualDataWindow">if set to <c>true</c> [is virtual data window].</param>
        /// <param name="statementMetricHandle">The statement metric handle.</param>
        /// <param name="optionalUniqueKeyProps">The optional unique key props.</param>
        /// <param name="eventTypeAsName">Name of the event type as.</param>
        public NamedWindowProcessor(
            string namedWindowName,
            NamedWindowService namedWindowService,
            string contextName,
            EventType eventType,
            StatementResultService statementResultService,
            ValueAddEventProcessor revisionProcessor,
            string eplExpression,
            string statementName,
            bool isPrioritized,
            bool isEnableSubqueryIndexShare,
            bool enableQueryPlanLog,
            MetricReportingService metricReportingService,
            bool isBatchingDataWindow,
            bool isVirtualDataWindow,
            StatementMetricHandle statementMetricHandle,
            ICollection <string> optionalUniqueKeyProps,
            string eventTypeAsName,
            StatementResourceService statementResourceService)
        {
            _namedWindowName            = namedWindowName;
            _contextName                = contextName;
            _eventType                  = eventType;
            _eplExpression              = eplExpression;
            _statementName              = statementName;
            _isEnableSubqueryIndexShare = isEnableSubqueryIndexShare;
            _isVirtualDataWindow        = isVirtualDataWindow;
            _statementMetricHandle      = statementMetricHandle;
            _optionalUniqueKeyProps     = optionalUniqueKeyProps;
            _eventTypeAsName            = eventTypeAsName;
            _statementResourceService   = statementResourceService;
            _lock = LockManager.CreateLock(GetType());

            _rootView = new NamedWindowRootView(revisionProcessor, enableQueryPlanLog, metricReportingService, eventType, isBatchingDataWindow, isEnableSubqueryIndexShare, optionalUniqueKeyProps);
            _tailView = new NamedWindowTailView(eventType, namedWindowService, statementResultService, revisionProcessor, isPrioritized, isBatchingDataWindow);
        }