Esempio n. 1
0
 public BatchFactory(TimerQueueProvider batchQueueProvider,
                     IDispatcherPlugin plugin,
                     BatchConfigProvider config,
                     IQueueEvent queueEvent,
                     LocalQueueProvider queueManager)
 {
     _batchQueueProvider = batchQueueProvider;
     _plugin             = plugin;
     _config             = config;
     _queueEvent         = queueEvent;
     _localQueue         = queueManager;
 }
Esempio n. 2
0
 internal BatchToken(LocalQueueProvider queue,
                     TimerQueueProvider timeQueueProvider,
                     IQueueEvent queueEvent,
                     ManualResetEventSlim manualResetEventSlim,
                     BatchConfigProvider batchConfig)
 {
     _cancellationTokenSource = new CancellationTokenSource();
     _queue = queue;
     _timerQueueProvider  = timeQueueProvider;
     _queueEvent          = queueEvent;
     _triggerAllCompleted = manualResetEventSlim;
     _batchConfig         = batchConfig;
 }
Esempio n. 3
0
        public ScheduleTimer(TimeSpan period, IQueueEvent queueEvent, Type type, LocalQueueProvider localQueueProvider, bool start = false)
        {
            _timer = new Timer(period.TotalMilliseconds)
            {
                Enabled   = start,
                AutoReset = true
            };

            _timer.Elapsed     += TimerElapsed;
            _queue              = queueEvent;
            _type               = type;
            _localQueueProvider = localQueueProvider;
        }
Esempio n. 4
0
 public TimerQueueProvider(BatchConfigProvider config, IQueueEvent queueEvent, LocalQueueProvider localQueueProvider)
 {
     _config             = config;
     _queueEvent         = queueEvent;
     _localQueueProvider = localQueueProvider;
 }