コード例 #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);
        }
コード例 #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);
     });
 }
コード例 #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[]> >());
        }
コード例 #4
0
ファイル: ExprNodeAdapter.cs プロジェクト: ecakirman/nesper
        /// <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;
            }
        }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DispatchServiceImpl"/> class.
 /// </summary>
 public DispatchServiceImpl()
 {
     _threadDispatchQueue = ThreadLocalManager.Create(
         () => new Queue <Dispatchable>());
 }
コード例 #6
0
 /// <summary>
 /// Ctor.
 /// </summary>
 public VariableVersionThreadLocal()
 {
     _vThreadLocal = ThreadLocalManager.Create <VariableVersionThreadEntry>(CreateEntry);
 }
コード例 #7
0
ファイル: ThreadWorkQueue.cs プロジェクト: ikvm/nesper
 /// <summary>
 /// Initializes a new instance of the <see cref="ThreadWorkQueue"/> class.
 /// </summary>
 public ThreadWorkQueue()
 {
     _threadQueue = ThreadLocalManager.Create(
         () => new DualWorkQueue <object>());
 }
コード例 #8
0
 public void Init()
 {
     _threadCache = ThreadLocalManager.Create(
         () => new ExpressionResultCacheServiceAgentInstance());
 }
コード例 #9
0
 public ExpressionResultCacheService(int declareExprCacheSize)
 {
     _declareExprCacheSize = declareExprCacheSize;
     _threadCache          = ThreadLocalManager.Create <ExpressionResultCacheServiceHolder>(
         () => new ExpressionResultCacheServiceHolder(declareExprCacheSize));
 }