/// <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); }
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); }); }
/// <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[]> >()); }
/// <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; } }
/// <summary> /// Initializes a new instance of the <see cref="DispatchServiceImpl"/> class. /// </summary> public DispatchServiceImpl() { _threadDispatchQueue = ThreadLocalManager.Create( () => new Queue <Dispatchable>()); }
/// <summary> /// Ctor. /// </summary> public VariableVersionThreadLocal() { _vThreadLocal = ThreadLocalManager.Create <VariableVersionThreadEntry>(CreateEntry); }
/// <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()); }
public ExpressionResultCacheService(int declareExprCacheSize) { _declareExprCacheSize = declareExprCacheSize; _threadCache = ThreadLocalManager.Create <ExpressionResultCacheServiceHolder>( () => new ExpressionResultCacheServiceHolder(declareExprCacheSize)); }