Exemplo n.º 1
0
        public virtual IndexSamplingController Create(IndexMapSnapshotProvider snapshotProvider)
        {
            OnlineIndexSamplingJobFactory jobFactory = new OnlineIndexSamplingJobFactory(_storeView, _tokenNameLookup, _logProvider);

            System.Predicate <long>      samplingUpdatePredicate = CreateSamplingPredicate();
            IndexSamplingJobQueue <long> jobQueue   = new IndexSamplingJobQueue <long>(samplingUpdatePredicate);
            IndexSamplingJobTracker      jobTracker = new IndexSamplingJobTracker(_config, _scheduler);

            IndexSamplingController.RecoveryCondition indexRecoveryCondition = CreateIndexRecoveryCondition(_logProvider, _tokenNameLookup);
            return(new IndexSamplingController(_config, jobFactory, jobQueue, jobTracker, snapshotProvider, _scheduler, indexRecoveryCondition));
        }
 private IndexSamplingController NewSamplingController(IndexSamplingController.RecoveryCondition recoveryPredicate)
 {
     return(new IndexSamplingController(_samplingConfig, _jobFactory, _jobQueue, _tracker, _snapshotProvider, _scheduler, recoveryPredicate));
 }