Esempio n. 1
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="name">is the name of the named window</param>
 /// <param name="processor">instance for processing the named window contents</param>
 /// <param name="eventType">the type of event</param>
 /// <param name="paramList">event parameters</param>
 protected internal NamedWindowLifecycleEvent(String name, NamedWindowProcessor processor, LifecycleEventType eventType, params Object[] paramList)
 {
     _name      = name;
     _processor = processor;
     _eventType = eventType;
     _paramList = paramList;
 }
 public NamedWindowProcessorInstance(int?agentInstanceId, NamedWindowProcessor processor, AgentInstanceContext agentInstanceContext)
 {
     _agentInstanceId  = agentInstanceId;
     _rootViewInstance = new NamedWindowRootViewInstance(processor.RootView, agentInstanceContext, processor.EventTableIndexMetadataRepo);
     _tailViewInstance = new NamedWindowTailViewInstance(_rootViewInstance, processor.TailView, processor, agentInstanceContext);
     _rootViewInstance.DataWindowContents = _tailViewInstance;       // for iteration used for delete without index
 }
Esempio n. 3
0
 public NamedWindowTailViewInstance(NamedWindowRootViewInstance rootViewInstance, NamedWindowTailView tailView, NamedWindowProcessor namedWindowProcessor, AgentInstanceContext agentInstanceContext)
 {
     _rootViewInstance     = rootViewInstance;
     _tailView             = tailView;
     _namedWindowProcessor = namedWindowProcessor;
     _agentInstanceContext = agentInstanceContext;
     _consumersInContext   = NamedWindowUtil.CreateConsumerMap(tailView.IsPrioritized);
     _latchFactory         = tailView.MakeLatchFactory();
 }
Esempio n. 4
0
 public NamedWindowTailViewInstance(NamedWindowRootViewInstance rootViewInstance, NamedWindowTailView tailView, NamedWindowProcessor namedWindowProcessor, AgentInstanceContext agentInstanceContext)
 {
     _rootViewInstance     = rootViewInstance;
     _tailView             = tailView;
     _namedWindowProcessor = namedWindowProcessor;
     _agentInstanceContext = agentInstanceContext;
     _consumersInContext   = NamedWindowUtil.CreateConsumerMap(tailView.IsPrioritized);
     _latchFactory         = new NamedWindowConsumerLatchFactory(
         namedWindowProcessor.NamedWindowType.Name,
         tailView.ThreadingConfig.IsNamedWindowConsumerDispatchPreserveOrder,
         tailView.ThreadingConfig.NamedWindowConsumerDispatchTimeout,
         tailView.ThreadingConfig.NamedWindowConsumerDispatchLocking,
         tailView.TimeSourceService);
 }
Esempio n. 5
0
        public NamedWindowProcessor AddProcessor(
            string name,
            string contextName,
            EventType eventType,
            StatementResultService statementResultService,
            ValueAddEventProcessor revisionProcessor,
            string eplExpression,
            string statementName,
            bool isPrioritized,
            bool isEnableSubqueryIndexShare,
            bool isBatchingDataWindow,
            bool isVirtualDataWindow,
            StatementMetricHandle statementMetricHandle,
            ICollection <string> optionalUniqueKeyProps,
            string eventTypeAsName,
            StatementResourceService statementResourceService)
        {
            if (_processors.ContainsKey(name))
            {
                throw new ViewProcessingException("A named window by name '" + name + "' has already been created");
            }

            var processor = new NamedWindowProcessor(
                name, this, contextName, eventType, statementResultService, revisionProcessor,
                eplExpression, statementName, isPrioritized, isEnableSubqueryIndexShare, _enableQueryPlanLog,
                _metricReportingService, isBatchingDataWindow, isVirtualDataWindow, statementMetricHandle,
                optionalUniqueKeyProps, eventTypeAsName, statementResourceService);

            _processors.Put(name, processor);

            if (!_observers.IsEmpty())
            {
                var theEvent = new NamedWindowLifecycleEvent(name, processor, NamedWindowLifecycleEvent.LifecycleEventType.CREATE);
                foreach (var observer in _observers)
                {
                    observer.Observe(theEvent);
                }
            }

            return(processor);
        }