public EventBusSource( ILockManager lockManager, IThreadLocalManager threadLocalManager) { _iLock = lockManager.CreateLock(GetType()); _collectorDataTL = threadLocalManager.Create <EPDataFlowEventBeanCollectorContext>(() => null); }
/// <summary> /// Ctor. /// </summary> /// <param name="statementResultServiceImpl">handles result delivery</param> /// <param name="dispatchService">for performing the dispatch</param> /// <param name="threadLocalManager">The thread local manager.</param> public UpdateDispatchViewNonBlocking( StatementResultService statementResultServiceImpl, DispatchService dispatchService, IThreadLocalManager threadLocalManager) : base(statementResultServiceImpl, dispatchService, threadLocalManager) { }
public TableServiceImpl( IReaderWriterLockManager rwLockManager, IThreadLocalManager threadLocalManager) { _tableExprEvaluatorContext = new TableExprEvaluatorContext(threadLocalManager); _rwLockManager = rwLockManager; }
public ExpressionResultCacheService( int declareExprCacheSize, IThreadLocalManager threadLocalManager) { _declareExprCacheSize = declareExprCacheSize; _threadCache = threadLocalManager.Create( () => new ExpressionResultCacheServiceHolder(declareExprCacheSize)); }
public EPStatementSource( ILockManager lockManager, IThreadLocalManager threadLocalManager) { _iLock = lockManager.CreateLock(MethodBase.GetCurrentMethod().DeclaringType); _collectorDataTL = threadLocalManager.Create <EPDataFlowIRStreamCollectorContext>(() => null); _lifeCycleEventHandler = Observe; }
public ExprConcatNodeEvalThreadLocal( ExprConcatNode parent, ExprEvaluator[] evaluators, IThreadLocalManager threadLocalManager) { _parent = parent; _evaluators = evaluators; _localBuffer = threadLocalManager.Create <StringBuilder>(() => new StringBuilder()); }
/// <summary> /// Initializes a new instance of the <see cref="VariableVersionThreadLocal"/> class. /// </summary> /// <param name="threadLocalManager">The thread local manager.</param> public VariableVersionThreadLocal(IThreadLocalManager threadLocalManager) { if (threadLocalManager != null) { _vThreadLocal = threadLocalManager.Create(CreateEntry); } else { _vThreadLocal = null; } }
/// <summary> /// Ctor. /// </summary> /// <param name="statementResultService">handles result delivery</param> /// <param name="dispatchService">for performing the dispatch</param> /// <param name="threadLocalManager">The thread local manager.</param> protected UpdateDispatchViewBase( StatementResultService statementResultService, DispatchService dispatchService, IThreadLocalManager threadLocalManager) { _isDispatchWaiting = threadLocalManager.Create(() => new Mutable <bool>()); DispatchService = dispatchService; StatementResultService = statementResultService; }
public ExprNodeAdapterMultiStreamStmtLock( int filterSpecId, int filterSpecParamPathNum, ExprNode exprNode, ExprEvaluatorContext evaluatorContext, VariableService variableService, EventBean[] prototype, IThreadLocalManager threadLocalManager) : base(filterSpecId, filterSpecParamPathNum, exprNode, evaluatorContext, variableService, prototype, threadLocalManager) { }
public MethodPollingViewable( MethodStreamSpec methodStreamSpec, DataCache dataCache, EventType eventType, ExprEvaluatorContext exprEvaluatorContext, MethodPollingViewableMeta metadata, IThreadLocalManager threadLocalManager) { _methodStreamSpec = methodStreamSpec; _dataCacheThreadLocal = threadLocalManager.Create <DataCache>(() => null); _dataCache = dataCache; _eventType = eventType; _exprEvaluatorContext = exprEvaluatorContext; _metadata = metadata; }
/// <summary> /// Ctor. /// </summary> /// <param name="myStreamNumber">is the stream number of the view</param> /// <param name="inputParameters">are the event property names providing input parameter keys</param> /// <param name="pollExecStrategy">is the strategy to use for retrieving results</param> /// <param name="dataCache">is looked up before using the strategy</param> /// <param name="eventType">is the type of events generated by the view</param> /// <param name="threadLocalManager">The thread local manager.</param> public DatabasePollingViewable( int myStreamNumber, IList <String> inputParameters, PollExecStrategy pollExecStrategy, DataCache dataCache, EventType eventType, IThreadLocalManager threadLocalManager) { _dataCacheThreadLocal = threadLocalManager.Create <DataCache>(() => null); _myStreamNumber = myStreamNumber; _inputParameters = inputParameters; _pollExecStrategy = pollExecStrategy; _dataCache = dataCache; _eventType = eventType; }
/// <summary> /// Ctor. /// </summary> /// <param name="statementName">Name of the statement.</param> /// <param name="statementLifecycleSvc">handles persistence for statements</param> /// <param name="metricReportingService">for metrics reporting</param> /// <param name="threadingService">for outbound threading</param> /// <param name="threadLocalManager">The thread local manager.</param> public StatementResultServiceImpl( String statementName, StatementLifecycleSvc statementLifecycleSvc, MetricReportingServiceSPI metricReportingService, ThreadingService threadingService, IThreadLocalManager threadLocalManager) { Log.Debug(".ctor"); _threadLocalManager = threadLocalManager; _lastResults = threadLocalManager.Create(() => new LinkedList <UniformPair <EventBean[]> >()); _isDebugEnabled = ExecutionPathDebugLog.IsEnabled && Log.IsDebugEnabled; _statementName = statementName; _statementLifecycleSvc = statementLifecycleSvc; _metricReportingService = metricReportingService; _statementOutputHooks = metricReportingService != null ? metricReportingService.StatementOutputHooks : new List <StatementResultListener>(); _threadingService = threadingService; }
/// <summary> /// Ctor. /// </summary> /// <param name="schedulingService">The scheduling service.</param> /// <param name="variableService">is for variable access</param> /// <param name="tableService">The table service.</param> /// <param name="isPrioritized">if the engine is running with prioritized execution</param> /// <param name="eventProcessingRWLock">The event processing rw lock.</param> /// <param name="exceptionHandlingService">The exception handling service.</param> /// <param name="metricReportingService">The metric reporting service.</param> /// <param name="threadLocalManager">The thread local manager.</param> public NamedWindowDispatchServiceImpl( SchedulingService schedulingService, VariableService variableService, TableService tableService, bool isPrioritized, IReaderWriterLock eventProcessingRWLock, ExceptionHandlingService exceptionHandlingService, MetricReportingService metricReportingService, IThreadLocalManager threadLocalManager) { _threadLocal = threadLocalManager.Create <DispatchesTL>(() => new DispatchesTL()); _schedulingService = schedulingService; _variableService = variableService; _tableService = tableService; _isPrioritized = isPrioritized; _eventProcessingRwLock = eventProcessingRWLock; _exceptionHandlingService = exceptionHandlingService; _metricReportingService = metricReportingService; }
public ExprNodeAdapterMultiStream( int filterSpecId, int filterSpecParamPathNum, ExprNode exprNode, ExprEvaluatorContext evaluatorContext, VariableService variableService, EventBean[] prototype, IThreadLocalManager threadLocalManager) : 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> /// 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> /// <param name="threadLocalManager">The thread local manager.</param> public ExprNodeAdapter( ExprNode exprNode, EventBean[] prototype, VariableService variableService, IThreadLocalManager threadLocalManager) { _exprNode = exprNode; _exprNodeEval = exprNode.ExprEvaluator; _variableService = variableService; _arrayPerThread = threadLocalManager.Create <EventBean[]>(CreateLocalData); if (prototype == null) { _prototype = new EventBean[1]; } else { _prototype = prototype; } }
public IntersectViewFactory(IContainer container) { _threadLocalManager = container.ThreadLocalManager(); }
/// <summary> /// Ctor. /// </summary> /// <param name="statementResultService">handles result delivery</param> /// <param name="dispatchService">for performing the dispatch</param> /// <param name="msecTimeout">timeout for preserving dispatch order through blocking</param> /// <param name="timeSourceService">time source provider</param> /// <param name="threadLocalManager">The thread local manager.</param> public UpdateDispatchViewBlockingSpin(StatementResultService statementResultService, DispatchService dispatchService, long msecTimeout, TimeSourceService timeSourceService, IThreadLocalManager threadLocalManager) : base(statementResultService, dispatchService, threadLocalManager) { _currentFutureSpin = new UpdateDispatchFutureSpin(timeSourceService); // use a completed future as a start _msecTimeout = msecTimeout; _timeSourceService = timeSourceService; }
public EventBusSink(IThreadLocalManager threadLocalManager) { _collectorDataTL = threadLocalManager.Create <EPDataFlowEventCollectorContext>(() => null); }
/// <summary> /// Ctor. /// </summary> /// <param name="statementResultServiceImpl">handles result delivery</param> /// <param name="dispatchService">for performing the dispatch</param> /// <param name="msecTimeout">timeout for preserving dispatch order through blocking</param> /// <param name="threadLocalManager">The thread local manager.</param> public UpdateDispatchViewBlockingWait(StatementResultService statementResultServiceImpl, DispatchService dispatchService, long msecTimeout, IThreadLocalManager threadLocalManager) : base(statementResultServiceImpl, dispatchService, threadLocalManager) { _currentFutureWait = new UpdateDispatchFutureWait(); // use a completed future as a start _msecTimeout = msecTimeout; }
protected ExprNodeAdapterBase GetLockableMultiStream(int filterSpecId, int filterSpecParamPathNum, ExprNode exprNode, ExprEvaluatorContext exprEvaluatorContext, VariableService variableServiceToUse, EventBean[] events, IThreadLocalManager threadLocalManager) { return(new ExprNodeAdapterMultiStreamStmtLock(filterSpecId, filterSpecParamPathNum, exprNode, exprEvaluatorContext, variableServiceToUse, events, threadLocalManager)); }
/// <summary> Returns new service.</summary> /// <returns> new dispatch service implementation. /// </returns> public static DispatchService NewService(IThreadLocalManager threadLocalManager) { return(new DispatchServiceImpl(threadLocalManager)); }
/// <summary> /// Initializes a new instance of the <see cref="ThreadWorkQueue"/> class. /// </summary> public ThreadWorkQueue(IThreadLocalManager threadLocalManager) { _threadQueue = threadLocalManager.Create( () => new DualWorkQueue <object>()); }
public TableExprEvaluatorContext(IThreadLocalManager threadLocalManager) { _threadLocal = threadLocalManager.Create <IDictionary <ILockable, IDisposable> >( () => new Dictionary <ILockable, IDisposable>()); }
/// <summary> /// Initializes a new instance of the <see cref="DispatchServiceImpl"/> class. /// </summary> public DispatchServiceImpl(IThreadLocalManager threadLocalManager) { _threadDispatchQueue = threadLocalManager.Create( () => new Queue <Dispatchable>()); }