public RuleEvaluationRequestsDatabaseProducer(IEvaluationRequestsService evaluationRequestsService, BlockingCollection <RuleEvaluationRequest> workQueue, Func <IEvaluationRequestsService> evaluationRequestsServiceFactory /*, ILoggerFactory loggerFactory*/, WorkQueueCounter counter, PerformanceMetricsCollector performanceMetricsCollector) { //_logger = loggerFactory.GetLogger("RuleEngine_WindowsService"); //_context = new TrmrLogContext("RuleEngine_WindowsService"); this._workQueue = workQueue; this._evaluationRequestsServiceFactory = evaluationRequestsServiceFactory; this._counter = counter; _metricsCollector = performanceMetricsCollector; InitializeCapacityThresholds(); }
public RuleEvaluationRequestsConsumer(BlockingCollection <RuleEvaluationRequest> workQueue, Func <IRuleLogicExecutionService <EFileDocument> > logicExecutionServiceFactory, Func <IEvaluationRequestsService> evaluationRequestsServiceFactory, WorkQueueCounter counter, Processor processor /*, ILoggerFactory loggerFactory*/) { //_logger = loggerFactory.GetLogger("RuleEngine_WindowsService"); //_context = new TrmrLogContext("RuleEngine_WindowsService"); this._workQueue = workQueue; this._logicExecutionServiceFactory = logicExecutionServiceFactory; this._evaluationRequestsServiceFactory = evaluationRequestsServiceFactory; this._allTasks = new List <Task>(); this.sem = new Semaphore(workQueue.BoundedCapacity, workQueue.BoundedCapacity); this._counter = counter; this._processor = processor; }