internal AsyncFlushHandler(IBatchFactory batchFactory, IRequestHandler requestHandler, int maxQueueSize, int maxBatchSize, int flushIntervalInMillis) { _queue = new BlockingQueue <BaseAction>(); this._batchFactory = batchFactory; this._requestHandler = requestHandler; this.MaxQueueSize = maxQueueSize; this.MaxBatchSize = maxBatchSize; _flushIntervalInMillis = flushIntervalInMillis; #if NET_NOTHREAD // set that the queue is currently empty _idle = new ManualResetEvent(true); _continue = new CancellationTokenSource(); // start the long running flushing task Task.Factory.StartNew(() => Loop(), _continue.Token); #else _continue = true; // set that the queue is currently empty _idle = new ManualResetEvent(true); // start the flushing thread _flushingThread = new Thread(new ThreadStart(Loop)); _flushingThread.Start(); #endif }
internal BlockingFlushHandler(IBatchFactory batchFactory, IRequestHandler requestHandler) { this._batchFactory = batchFactory; this._requestHandler = requestHandler; }
internal void Initialize(IBatchFactory batchFactory, IRequestHandler requestHandler, int maxQueueSize, bool async) { this.dataStore = new LocalStore(); this.batchFactory = batchFactory; this.requestHandler = requestHandler; this.MaxQueueSize = maxQueueSize; this.Async = async; this.context = this.GetContext(); }
public LeaguesService( IUnitOfWork unitOfWork, IFootballDataService footballDataService, IBatchFactory batchFactory, IMapper mapper) { _unitOfWork = unitOfWork; _footballDataService = footballDataService; _batchFactory = batchFactory; _mapper = mapper; }
public BatchingFlushHandler( IBatchFactory batchFactory, IRequestHandler requestHandler, int minBatchSize, int maxQueueSize, TimeSpan minInterval ) : this() { this.requestHandler = requestHandler; this.batchFactory = batchFactory; this.minBatchSize = minBatchSize; this.maxQueueSize = maxQueueSize; this.minInterval = minInterval; }
internal AsyncFlushHandler(IBatchFactory batchFactory, IRequestHandler requestHandler, int maxQueueSize) { this.queue = new BlockingQueue<BaseAction>(); this.batchFactory = batchFactory; this.requestHandler = requestHandler; this.MaxQueueSize = maxQueueSize; this.isDisposed = false; // set that the queue is currently empty this.idle = new ManualResetEvent(true); // start the flushing thread this.flushingThread = new Thread(new ThreadStart(this.Loop)); this.flushingThread.Start(); }
internal AsyncIntervalFlushHandler(IBatchFactory batchFactory, IRequestHandler requestHandler, int maxQueueSize, int maxBatchSize, int flushIntervalInMillis) { _queue = new ConcurrentQueue <BaseAction>(); _batchFactory = batchFactory; _requestHandler = requestHandler; _maxQueueSize = maxQueueSize; _maxBatchSize = maxBatchSize; _continue = new CancellationTokenSource(); _flushIntervalInMillis = flushIntervalInMillis; RunInterval(); }
internal AsyncFlushHandler(IBatchFactory batchFactory, IRequestHandler requestHandler, int maxQueueSize) { _queue = new BlockingQueue <BaseAction>(); this._batchFactory = batchFactory; this._requestHandler = requestHandler; this.MaxQueueSize = maxQueueSize; // set that the queue is currently empty _idle = new ManualResetEvent(true); _continue = new CancellationTokenSource(); // start the long running flushing task Task.Factory.StartNew(() => Loop(), _continue.Token); }
internal AsyncFlushHandler(IBatchFactory batchFactory, IRequestHandler requestHandler, int maxQueueSize) { _queue = new BlockingQueue<BaseAction>(); _batchFactory = batchFactory; _requestHandler = requestHandler; MaxQueueSize = maxQueueSize; // set that the queue is currently empty _idle = new ManualResetEvent(true); _continue = new CancellationTokenSource(); // start the long running flushing task Task.Factory.StartNew (() => Loop (), _continue.Token); }
internal AsyncFlushHandler(IBatchFactory batchFactory, IRequestHandler requestHandler, int maxQueueSize) { _queue = new BlockingQueue <BaseAction>(); this._batchFactory = batchFactory; this._requestHandler = requestHandler; this.MaxQueueSize = maxQueueSize; _continue = true; // set that the queue is currently empty _idle = new ManualResetEvent(true); // start the flushing thread _flushingThread = new Thread(new ThreadStart(Loop)); _flushingThread.Start(); }
internal AsyncFlushHandler(IBatchFactory batchFactory, IRequestHandler requestHandler, int maxQueueSize) { _queue = new BlockingQueue<BaseAction>(); _batchFactory = batchFactory; _requestHandler = requestHandler; MaxQueueSize = maxQueueSize; _continue = true; // set that the queue is currently empty _idle = new ManualResetEvent(true); // start the flushing thread var flushingThread = new Thread(Loop); flushingThread.Start(); }
public DecisionBase(IBatchFactory factory, int qty) { this.factory = factory; this.qty = qty; }
public BatchProcessor(ILogger <BatchProcessor> logger, IBatchFactory factory, IDataSession dataSession) { _factory = factory; _logger = logger; _dataSession = dataSession; }
protected DecisionBase(IBatchFactory factory, int quantity) { _factory = factory; _quantity = quantity; }
public BatchProcessor(IBatchFactory factory) { _factory = factory; }