Example #1
0
 public SelfRefreshingSegmentFetcher(ISegmentChangeFetcher segmentChangeFetcher, IReadinessGatesCache gates, int interval, ISegmentCache segmentsCache, int numberOfParallelSegments) : base(segmentsCache)
 {
     this.segmentChangeFetcher = segmentChangeFetcher;
     this.segments             = new ConcurrentDictionary <string, SelfRefreshingSegment>();
     worker        = new SegmentTaskWorker(numberOfParallelSegments);
     this.interval = interval;
     this.gates    = gates;
     StartWorker();
 }
Example #2
0
        public SelfRefreshingSegmentFetcher(ISegmentChangeFetcher segmentChangeFetcher,
                                            IReadinessGatesCache gates,
                                            int interval,
                                            ISegmentCache segmentsCache,
                                            int numberOfParallelSegments) : base(segmentsCache)
        {
            _cancelTokenSource = new CancellationTokenSource();

            _segmentChangeFetcher = segmentChangeFetcher;
            _segments             = new ConcurrentDictionary <string, SelfRefreshingSegment>();
            _worker         = new SegmentTaskWorker(numberOfParallelSegments);
            _interval       = interval;
            _gates          = gates;
            _wrappedAdapter = new WrapperAdapter();

            StartWorker();
        }
Example #3
0
 public SelfRefreshingSegmentFetcher(ISegmentChangeFetcher segmentChangeFetcher,
                                     IStatusManager statusManager,
                                     int interval,
                                     ISegmentCache segmentsCache,
                                     int numberOfParallelSegments,
                                     ISegmentTaskQueue segmentTaskQueue,
                                     ITasksManager tasksManager,
                                     IWrapperAdapter wrapperAdapter) : base(segmentsCache)
 {
     _segmentChangeFetcher = segmentChangeFetcher;
     _segments             = new ConcurrentDictionary <string, SelfRefreshingSegment>();
     _worker           = new SegmentTaskWorker(numberOfParallelSegments, segmentTaskQueue);
     _interval         = interval;
     _statusManager    = statusManager;
     _wrappedAdapter   = wrapperAdapter;
     _segmentTaskQueue = segmentTaskQueue;
     _tasksManager     = tasksManager;
 }