Exemplo n.º 1
0
 /// <summary>
 /// Ctor - use for the first and unused latch to indicate completion.
 /// </summary>
 public NamedWindowConsumerLatchSpin(NamedWindowConsumerLatchFactory factory)
     : base(null, null)
 {
     _factory     = factory;
     _isCompleted = true;
     _earlier     = null;
 }
Exemplo n.º 2
0
 public void AddDispatch(
     NamedWindowConsumerLatchFactory latchFactory,
     NamedWindowDeltaData delta,
     IDictionary <EPStatementAgentInstanceHandle, IList <NamedWindowConsumerView> > consumers)
 {
     _threadLocal.GetOrCreate().Add(
         latchFactory.NewLatch(delta, consumers));
 }
Exemplo n.º 3
0
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="deltaData">The delta data.</param>
        /// <param name="dispatchTo">The dispatch to.</param>
        /// <param name="factory">The factory.</param>
        /// <param name="earlier">the latch before this latch that this latch should be waiting for</param>
        public NamedWindowConsumerLatchSpin(NamedWindowDeltaData deltaData, IDictionary <EPStatementAgentInstanceHandle, IList <NamedWindowConsumerView> > dispatchTo, NamedWindowConsumerLatchFactory factory, NamedWindowConsumerLatchSpin earlier)
            : base(deltaData, dispatchTo)
        {
            _factory = factory;
            _earlier = earlier;
#if DEBUG && DEVELOPMENT
            _allocTime = _factory.TimeSourceService.GetTimeMillis();
#endif
        }
Exemplo 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         = tailView.MakeLatchFactory();
 }
Exemplo n.º 5
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);
 }
Exemplo n.º 6
0
 public void AddDispatches(
     NamedWindowConsumerLatchFactory latchFactory,
     IDictionary <EPStatementAgentInstanceHandle, IList <NamedWindowConsumerView> > consumersInContext,
     NamedWindowDeltaData delta,
     AgentInstanceContext agentInstanceContext)
 {
     if (!consumersInContext.IsEmpty())
     {
         _namedWindowDispatchService.AddDispatch(latchFactory, delta, consumersInContext);
     }
     if (!_consumersNonContext.IsEmpty())
     {
         _namedWindowDispatchService.AddDispatch(latchFactory, delta, _consumersNonContext);
     }
 }
Exemplo n.º 7
0
 /// <summary>
 /// Ctor.
 /// </summary>
 /// <param name="earlier">the latch before this latch that this latch should be waiting for</param>
 public NamedWindowConsumerLatchSpin(NamedWindowDeltaData deltaData, IDictionary <EPStatementAgentInstanceHandle, IList <NamedWindowConsumerView> > dispatchTo, NamedWindowConsumerLatchFactory factory, NamedWindowConsumerLatchSpin earlier)
     : base(deltaData, dispatchTo)
 {
     _factory = factory;
     _earlier = earlier;
 }