Ejemplo n.º 1
0
 public IndexingExecuter(WorkContext context, DatabaseEtagSynchronizer synchronizer, Prefetcher prefetcher)
     : base(context)
 {
     autoTuner           = new IndexBatchSizeAutoTuner(context);
     etagSynchronizer    = synchronizer.GetSynchronizer(EtagSynchronizerType.Indexer);
     prefetchingBehavior = prefetcher.GetPrefetchingBehavior(PrefetchingUser.Indexer);
 }
Ejemplo n.º 2
0
		public IndexingExecuter(WorkContext context, DatabaseEtagSynchronizer synchronizer, Prefetcher prefetcher)
			: base(context)
		{
			autoTuner = new IndexBatchSizeAutoTuner(context);
			etagSynchronizer = synchronizer.GetSynchronizer(EtagSynchronizerType.Indexer);
			prefetchingBehavior = prefetcher.GetPrefetchingBehavior(PrefetchingUser.Indexer, autoTuner);
		}
Ejemplo n.º 3
0
 public IndexingExecuter(WorkContext context, Prefetcher prefetcher)
     : base(context)
 {
     autoTuner                  = new IndexBatchSizeAutoTuner(context);
     this.prefetcher            = prefetcher;
     defaultPrefetchingBehavior = prefetcher.CreatePrefetchingBehavior(PrefetchingUser.Indexer, autoTuner);
     prefetchingBehaviors.TryAdd(defaultPrefetchingBehavior);
 }
Ejemplo n.º 4
0
		public IndexingExecuter(WorkContext context, Prefetcher prefetcher)
			: base(context)
		{
			autoTuner = new IndexBatchSizeAutoTuner(context);
			this.prefetcher = prefetcher;
			defaultPrefetchingBehavior = prefetcher.CreatePrefetchingBehavior(PrefetchingUser.Indexer, autoTuner);
			prefetchingBehaviors.TryAdd(defaultPrefetchingBehavior);
		}
Ejemplo n.º 5
0
        protected AbstractIndexingExecuter(ITransactionalStorage transactionalStorage, WorkContext context, TaskScheduler scheduler)
        {
            this.transactionalStorage = transactionalStorage;
            this.context   = context;
            this.scheduler = scheduler;

            autoTuner = new IndexBatchSizeAutoTuner(context);
        }
Ejemplo n.º 6
0
 public IndexingExecuter(WorkContext context, Prefetcher prefetcher, IndexReplacer indexReplacer)
     : base(context, indexReplacer)
 {
     autoTuner                  = new IndexBatchSizeAutoTuner(context);
     this.prefetcher            = prefetcher;
     defaultPrefetchingBehavior = prefetcher.CreatePrefetchingBehavior(PrefetchingUser.Indexer, autoTuner);
     defaultPrefetchingBehavior.ShouldHandleUnusedDocumentsAddedAfterCommit = true;
     prefetchingBehaviors.TryAdd(defaultPrefetchingBehavior);
 }
Ejemplo n.º 7
0
 public IndexingExecuter(WorkContext context, Prefetcher prefetcher, IndexReplacer indexReplacer)
     : base(context, indexReplacer)
 {
     autoTuner = new IndexBatchSizeAutoTuner(context);
     this.prefetcher = prefetcher;
     defaultPrefetchingBehavior = prefetcher.CreatePrefetchingBehavior(PrefetchingUser.Indexer, autoTuner, "Default Prefetching behavior", true);
     defaultPrefetchingBehavior.ShouldHandleUnusedDocumentsAddedAfterCommit = true;
     prefetchingBehaviors.TryAdd(defaultPrefetchingBehavior);
 }
Ejemplo n.º 8
0
        protected PrefetcherWithContext CreatePrefetcher(Action<InMemoryRavenConfiguration> modifyConfiguration = null, Action<WorkContext> modifyWorkContext = null)
        {
            var configuration = new InMemoryRavenConfiguration
            {
                RunInMemory = true
            };

            configuration.Initialize();

            if (modifyConfiguration != null)
                modifyConfiguration(configuration);

            var transactionalStorage = new TransactionalStorage(configuration, () => { }, () => { }, () => { }, () => { });
            transactionalStorage.Initialize(new SequentialUuidGenerator { EtagBase = 0 }, new OrderedPartCollection<AbstractDocumentCodec>());

            var workContext = new WorkContext
            {
                Configuration = configuration,
                TransactionalStorage = transactionalStorage
            };

            if (modifyWorkContext != null)
                modifyWorkContext(workContext);

            var autoTuner = new IndexBatchSizeAutoTuner(workContext);

            var prefetchingBehavior = new PrefetchingBehavior(PrefetchingUser.Indexer, workContext, autoTuner, string.Empty);

            var prefetcherWithContext = new PrefetcherWithContext
                                        {
                                            AutoTuner = autoTuner,
                                            Configuration = configuration,
                                            PrefetchingBehavior = prefetchingBehavior,
                                            TransactionalStorage = transactionalStorage,
                                            WorkContext = workContext
                                        };

            createdPrefetchers.Add(prefetcherWithContext);

            return prefetcherWithContext;
        }
Ejemplo n.º 9
0
		public IndexingExecuter(WorkContext context)
			: base(context)
		{
			autoTuner = new IndexBatchSizeAutoTuner(context);
		}
Ejemplo n.º 10
0
		public IndexingExecuter(ITransactionalStorage transactionalStorage, WorkContext context, TaskScheduler scheduler)
			: base(transactionalStorage, context, scheduler)
		{
			autoTuner = new IndexBatchSizeAutoTuner(context);
		}
Ejemplo n.º 11
0
 public IndexingExecuter(WorkContext context, Prefetcher prefetcher)
     : base(context)
 {
     autoTuner           = new IndexBatchSizeAutoTuner(context);
     prefetchingBehavior = prefetcher.GetPrefetchingBehavior(PrefetchingUser.Indexer, autoTuner);
 }
Ejemplo n.º 12
0
 public IndexingExecuter(WorkContext context)
     : base(context)
 {
     autoTuner           = new IndexBatchSizeAutoTuner(context);
     prefetchingBehavior = new PrefetchingBehavior(context, autoTuner);
 }
Ejemplo n.º 13
0
		public IndexingExecuter(WorkContext context, Prefetcher prefetcher)
			: base(context)
		{
			autoTuner = new IndexBatchSizeAutoTuner(context);
			prefetchingBehavior = prefetcher.GetPrefetchingBehavior(PrefetchingUser.Indexer, autoTuner);
		}
Ejemplo n.º 14
0
		public IndexingExecuter(WorkContext context)
			: base(context)
		{
			autoTuner = new IndexBatchSizeAutoTuner(context);
			prefetchingBehavior = new PrefetchingBehavior(context, autoTuner);
		}
Ejemplo n.º 15
0
 public IndexingExecuter(ITransactionalStorage transactionalStorage, WorkContext context, TaskScheduler scheduler)
     : base(transactionalStorage, context, scheduler)
 {
     autoTuner = new IndexBatchSizeAutoTuner(context);
 }
Ejemplo n.º 16
0
 public IndexingExecuter(WorkContext context)
     : base(context)
 {
     autoTuner = new IndexBatchSizeAutoTuner(context);
 }