Exemplo n.º 1
0
        /// <summary>Ctor. </summary>
        /// <param name="svc">isolated services</param>
        /// <param name="unisolatedSvc">engine services</param>
        public EPRuntimeIsolatedImpl(EPIsolationUnitServices svc, EPServicesContext unisolatedSvc)
        {
            _services           = svc;
            _unisolatedServices = unisolatedSvc;
            _threadWorkQueue    = new ThreadWorkQueue();

            _isSubselectPreeval           = unisolatedSvc.EngineSettingsService.EngineSettings.Expression.IsSelfSubselectPreeval;
            _isPrioritized                = unisolatedSvc.EngineSettingsService.EngineSettings.Execution.IsPrioritized;
            _isLatchStatementInsertStream = unisolatedSvc.EngineSettingsService.EngineSettings.Threading.IsInsertIntoDispatchPreserveOrder;

            _threadLocalData = ThreadLocalManager.Create(CreateLocalData);
        }
Exemplo n.º 2
0
 public ExprNodeAdapterMultiStream(int filterSpecId, int filterSpecParamPathNum, ExprNode exprNode, ExprEvaluatorContext evaluatorContext, VariableService variableService, EventBean[] prototype)
     : base(filterSpecId, filterSpecParamPathNum, exprNode, evaluatorContext, variableService)
 {
     _prototypeArray = prototype;
     _arrayPerThread = ThreadLocalManager.Create(
         () =>
     {
         var eventsPerStream = new EventBean[_prototypeArray.Length];
         Array.Copy(_prototypeArray, 0, eventsPerStream, 0, _prototypeArray.Length);
         return(eventsPerStream);
     });
 }
Exemplo n.º 3
0
        /// <summary>
        /// Dispatches when the statement is stopped any remaining results.
        /// </summary>
        public void DispatchOnStop()
        {
            var dispatches = _lastResults.GetOrCreate();

            if (dispatches.IsEmpty())
            {
                return;
            }

            Execute();

            _lastResults = ThreadLocalManager.Create(
                () => new LinkedList <UniformPair <EventBean[]> >());
        }
Exemplo n.º 4
0
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="exprNode">is the bool expression</param>
        /// <param name="prototype">is the row of events the we are matching on</param>
        /// <param name="variableService">for setting variable version for evaluating variables, if required</param>
        public ExprNodeAdapter(ExprNode exprNode, EventBean[] prototype,
                               VariableService variableService)
        {
            _exprNode        = exprNode;
            _exprNodeEval    = exprNode.ExprEvaluator;
            _variableService = variableService;
            _arrayPerThread  = ThreadLocalManager.Create <EventBean[]>(CreateLocalData);

            if (prototype == null)
            {
                _prototype = new EventBean[1];
            }
            else
            {
                _prototype = prototype;
            }
        }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DispatchServiceImpl"/> class.
 /// </summary>
 public DispatchServiceImpl()
 {
     _threadDispatchQueue = ThreadLocalManager.Create(
         () => new Queue <Dispatchable>());
 }
Exemplo n.º 6
0
 /// <summary>
 /// Ctor.
 /// </summary>
 public VariableVersionThreadLocal()
 {
     _vThreadLocal = ThreadLocalManager.Create <VariableVersionThreadEntry>(CreateEntry);
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ThreadWorkQueue"/> class.
 /// </summary>
 public ThreadWorkQueue()
 {
     _threadQueue = ThreadLocalManager.Create(
         () => new DualWorkQueue <object>());
 }
 public void Init()
 {
     _threadCache = ThreadLocalManager.Create(
         () => new ExpressionResultCacheServiceAgentInstance());
 }
Exemplo n.º 9
0
 public ExpressionResultCacheService(int declareExprCacheSize)
 {
     _declareExprCacheSize = declareExprCacheSize;
     _threadCache          = ThreadLocalManager.Create <ExpressionResultCacheServiceHolder>(
         () => new ExpressionResultCacheServiceHolder(declareExprCacheSize));
 }