示例#1
0
 public UpdatePullerScheduler(JobScheduler scheduler, LogProvider logProvider, UpdatePuller updatePullingThread, long pullIntervalMillis)
 {
     this._scheduler          = scheduler;
     this._log                = logProvider.getLog(this.GetType());
     this._updatePuller       = updatePullingThread;
     this._pullIntervalMillis = pullIntervalMillis;
 }
示例#2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldBeAbleToCancelBeforeHandlingWithRealScheduler() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldBeAbleToCancelBeforeHandlingWithRealScheduler()
        {
            // given
            JobScheduler scheduler = createInitialisedScheduler();

            scheduler.Start();

            TimerService timerService = new TimerService(scheduler, FormattedLogProvider.toOutputStream(System.out));

            TimeoutHandler handlerA = timer =>
            {
            };

            Timer timer = timerService.Create(Timers.TimerA, _group, handlerA);

            timer.Set(fixedTimeout(2, SECONDS));

            // when
            timer.Cancel(SYNC_WAIT);

            // then: should not deadlock

            // cleanup
            scheduler.Stop();
            scheduler.Shutdown();
        }
示例#3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldHandleConcurrentResetAndInvocationOfHandler()
        public virtual void ShouldHandleConcurrentResetAndInvocationOfHandler()
        {
            // given
            JobScheduler scheduler = LifeRule.add(createScheduler());

            BinaryLatch invoked = new BinaryLatch();
            BinaryLatch done    = new BinaryLatch();

            TimeoutHandler handler = timer =>
            {
                invoked.Release();
                done.Await();
            };

            Timer timer = new Timer(() => "test", scheduler, Instance, Group.RAFT_TIMER, handler);

            timer.Set(new FixedTimeout(0, SECONDS));
            invoked.Await();

            // when
            timer.Reset();

            // then: should not deadlock

            // cleanup
            done.Release();
        }
 public DefaultTransactionTracer(Monitor monitor, JobScheduler jobScheduler) : this(Clocks.nanoClock(), monitor, jobScheduler)
 {
     if (!InstanceFieldsInitialized)
     {
         InitializeInstanceFields();
         InstanceFieldsInitialized = true;
     }
 }
示例#5
0
 internal PageCacheWarmerKernelExtension(JobScheduler scheduler, DatabaseAvailabilityGuard databaseAvailabilityGuard, PageCache pageCache, FileSystemAbstraction fs, NeoStoreDataSource dataSource, Log log, PageCacheWarmerMonitor monitor, Config config)
 {
     this._databaseAvailabilityGuard = databaseAvailabilityGuard;
     this._dataSource      = dataSource;
     this._config          = config;
     _pageCacheWarmer      = new PageCacheWarmer(fs, pageCache, scheduler, dataSource.DatabaseLayout.databaseDirectory());
     _availabilityListener = new WarmupAvailabilityListener(scheduler, _pageCacheWarmer, config, log, monitor);
 }
示例#6
0
 internal IdContextFactory(JobScheduler jobScheduler, System.Func <string, IdGeneratorFactory> idFactoryProvider, IdTypeConfigurationProvider idTypeConfigurationProvider, IdReuseEligibility eligibleForIdReuse, System.Func <IdGeneratorFactory, IdGeneratorFactory> factoryWrapper)
 {
     this._jobScheduler                = jobScheduler;
     this._idFactoryProvider           = idFactoryProvider;
     this._idTypeConfigurationProvider = idTypeConfigurationProvider;
     this._eligibleForIdReuse          = eligibleForIdReuse;
     this._factoryWrapper              = factoryWrapper;
 }
示例#7
0
 public LifecycleAdapterAnonymousInnerClass(QueryLoggerKernelExtension outerInstance, FileSystemAbstraction fileSystem, Config config, Monitors monitoring, LogService logService, JobScheduler jobScheduler)
 {
     this.outerInstance = outerInstance;
     this._fileSystem   = fileSystem;
     this._config       = config;
     this._monitoring   = monitoring;
     this._logService   = logService;
     this._jobScheduler = jobScheduler;
 }
示例#8
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public static AutoCloseable setupDataCollector(org.neo4j.kernel.impl.proc.Procedures procedures, org.neo4j.scheduler.JobScheduler jobScheduler, org.neo4j.internal.kernel.api.Kernel kernel, org.neo4j.kernel.monitoring.Monitors monitors, org.neo4j.values.ValueMapper_JavaMapper valueMapper, org.neo4j.kernel.configuration.Config config) throws org.neo4j.internal.kernel.api.exceptions.KernelException
        public static AutoCloseable SetupDataCollector(Procedures procedures, JobScheduler jobScheduler, Kernel kernel, Monitors monitors, Org.Neo4j.Values.ValueMapper_JavaMapper valueMapper, Config config)
        {
            Preconditions.checkState(kernel != null, "Kernel was null");
            DataCollector dataCollector = new DataCollector(kernel, jobScheduler, monitors, valueMapper, config);

            procedures.RegisterComponent(typeof(DataCollector), ctx => dataCollector, false);
            procedures.RegisterProcedure(typeof(DataCollectorProcedures));
            return(dataCollector);
        }
示例#9
0
        public static BackupProtocolService BackupProtocolService(Stream logDestination)
        {
            JobScheduler             scheduler          = createInitialisedScheduler();
            PageCache                pageCache          = createPageCache(new DefaultFileSystemAbstraction(), scheduler);
            BackupPageCacheContainer pageCacheContainer = of(pageCache, scheduler);

//JAVA TO C# CONVERTER TODO TASK: Method reference constructor syntax is not converted by Java to C# Converter:
            return(BackupProtocolService(DefaultFileSystemAbstraction::new, toOutputStream(logDestination), logDestination, new Monitors(), pageCacheContainer));
        }
示例#10
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override public org.neo4j.kernel.lifecycle.Lifecycle newInstance(@SuppressWarnings("unused") org.neo4j.kernel.impl.spi.KernelContext context, final Dependencies dependencies)
//JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected:
        public override Lifecycle NewInstance(KernelContext context, Dependencies dependencies)
        {
            FileSystemAbstraction fileSystem = dependencies.FileSystem();
            Config       config       = dependencies.Config();
            Monitors     monitoring   = dependencies.Monitoring();
            LogService   logService   = dependencies.Logger();
            JobScheduler jobScheduler = dependencies.JobScheduler();

            return(new LifecycleAdapterAnonymousInnerClass(this, fileSystem, config, monitoring, logService, jobScheduler));
        }
示例#11
0
 public CoreStateDownloaderService(JobScheduler jobScheduler, CoreStateDownloader downloader, CommandApplicationProcess applicationProcess, LogProvider logProvider, Org.Neo4j.causalclustering.helper.TimeoutStrategy_Timeout downloaderPauseStrategy, System.Func <DatabaseHealth> dbHealth, Monitors monitors)
 {
     this._jobScheduler       = jobScheduler;
     this._downloader         = downloader;
     this._applicationProcess = applicationProcess;
     this._log = logProvider.getLog(this.GetType());
     this._downloaderPauseStrategy = downloaderPauseStrategy;
     this._dbHealth = dbHealth;
     this._monitors = monitors;
 }
示例#12
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setUp()
        public virtual void SetUp()
        {
            _backupLayout          = TestDirectory.databaseLayout("backups");
            _backupDir             = _backupLayout.databaseDirectory().toPath();
            _fs                    = new DefaultFileSystemAbstraction();
            _jobScheduler          = new ThreadPoolJobScheduler();
            _pageCache             = StandalonePageCacheFactory.createPageCache(_fs, _jobScheduler);
            _backupProtocolService = _backupProtocolService();
            _backupTool            = new BackupTool(_backupProtocolService, mock(typeof(PrintStream)));
        }
示例#13
0
 /// <summary>
 /// Dependencies that can be resolved immediately after launching the backup tool
 /// </summary>
 /// <param name="outsideWorld"> filesystem and output streams that the tool interacts with </param>
 /// <param name="logProvider"> made available to subsequent dependency resolution classes </param>
 /// <param name="monitors"> will become shared across all resolved dependencies </param>
 internal BackupModule(OutsideWorld outsideWorld, LogProvider logProvider, Monitors monitors)
 {
     this._outsideWorld = outsideWorld;
     this._logProvider  = logProvider;
     this._monitors     = monitors;
     this._clock        = Clock.systemDefaultZone();
     this._transactionLogCatchUpFactory = new TransactionLogCatchUpFactory();
     this._fileSystemAbstraction        = outsideWorld.FileSystem();
     this._jobScheduler = createInitialisedScheduler();
 }
示例#14
0
 public DefaultTransactionTracer(SystemNanoClock clock, Monitor monitor, JobScheduler jobScheduler)
 {
     if (!InstanceFieldsInitialized)
     {
         InitializeInstanceFields();
         InstanceFieldsInitialized = true;
     }
     this._clock        = clock;
     this._monitor      = monitor;
     this._jobScheduler = jobScheduler;
 }
示例#15
0
 public EventReporterBuilder(Config config, MetricRegistry registry, Log logger, KernelContext kernelContext, LifeSupport life, FileSystemAbstraction fileSystem, JobScheduler scheduler, ConnectorPortRegister portRegister)
 {
     this._config        = config;
     this._registry      = registry;
     this._logger        = logger;
     this._kernelContext = kernelContext;
     this._life          = life;
     this._fileSystem    = fileSystem;
     this._scheduler     = scheduler;
     this._portRegister  = portRegister;
 }
        public override Lifecycle NewInstance(KernelContext context, Dependencies dependencies)
        {
            Config config    = dependencies.Config;
            bool   ephemeral = config.Get(GraphDatabaseSettings.ephemeral);
            FileSystemAbstraction fileSystemAbstraction = dependencies.FileSystem();
            DirectoryFactory      directoryFactory      = directoryFactory(ephemeral);
            OperationalMode       operationalMode       = context.DatabaseInfo().OperationalMode;
            JobScheduler          scheduler             = dependencies.Scheduler();

            IndexDirectoryStructure.Factory directoryStructureFactory = SubProviderDirectoryStructure(context.Directory());
            TokenHolders tokenHolders = dependencies.TokenHolders();
            Log          log          = dependencies.LogService.getInternalLog(typeof(FulltextIndexProvider));
            AuxiliaryTransactionStateManager auxiliaryTransactionStateManager;

            try
            {
                auxiliaryTransactionStateManager = dependencies.AuxiliaryTransactionStateManager();
            }
            catch (UnsatisfiedDependencyException e)
            {
                string message = "Fulltext indexes failed to register as transaction state providers. This means that, if queried, they will not be able to " +
                                 "uncommitted transactional changes into account. This is fine if the indexes are opened for non-transactional work, such as for " +
                                 "consistency checking. The reason given is: " + e.Message;
                LogDependencyException(context, log.ErrorLogger(), message);
                auxiliaryTransactionStateManager = new NullAuxiliaryTransactionStateManager();
            }

            FulltextIndexProvider provider = new FulltextIndexProvider(Descriptor, directoryStructureFactory, fileSystemAbstraction, config, tokenHolders, directoryFactory, operationalMode, scheduler, auxiliaryTransactionStateManager, log);

            string procedureRegistrationFailureMessage = "Failed to register the fulltext index procedures. The fulltext index provider will be loaded and " +
                                                         "updated like normal, but it might not be possible to query any fulltext indexes. The reason given is: ";

            try
            {
                dependencies.Procedures().registerComponent(typeof(FulltextAdapter), procContext => provider, true);
                dependencies.Procedures().registerProcedure(typeof(FulltextProcedures));
            }
            catch (KernelException e)
            {
                string message = procedureRegistrationFailureMessage + e.getUserMessage(new NonTransactionalTokenNameLookup(tokenHolders));
                // We use the 'warn' logger in this case, because it can occur due to multi-database shenanigans, or due to internal restarts in HA.
                // These scenarios are less serious, and will _probably_ not prevent FTS from working. Hence we only warn about this.
                LogDependencyException(context, log.WarnLogger(), message);
            }
            catch (UnsatisfiedDependencyException e)
            {
                string message = procedureRegistrationFailureMessage + e.Message;
                LogDependencyException(context, log.ErrorLogger(), message);
            }

            return(provider);
        }
示例#17
0
 public DatabaseMigrator(MigrationProgressMonitor progressMonitor, FileSystemAbstraction fs, Config config, LogService logService, IndexProviderMap indexProviderMap, ExplicitIndexProvider indexProvider, PageCache pageCache, RecordFormats format, LogTailScanner tailScanner, JobScheduler jobScheduler)
 {
     this._progressMonitor = progressMonitor;
     this._fs                    = fs;
     this._config                = config;
     this._logService            = logService;
     this._indexProviderMap      = indexProviderMap;
     this._explicitIndexProvider = indexProvider;
     this._pageCache             = pageCache;
     this._format                = format;
     this._tailScanner           = tailScanner;
     this._jobScheduler          = jobScheduler;
 }
示例#18
0
        public static PageCache CreatePageCache(FileSystemAbstraction fileSystem, JobScheduler jobScheduler)
        {
            SingleFilePageSwapperFactory factory = new SingleFilePageSwapperFactory();

            factory.Open(fileSystem, Configuration.EMPTY);

            PageCacheTracer cacheTracer = PageCacheTracer.NULL;
            DefaultPageCursorTracerSupplier cursorTracerSupplier   = DefaultPageCursorTracerSupplier.INSTANCE;
            VersionContextSupplier          versionContextSupplier = EmptyVersionContextSupplier.EMPTY;
            MemoryAllocator memoryAllocator = MemoryAllocator.createAllocator("8 MiB", GlobalMemoryTracker.INSTANCE);

            return(new MuninnPageCache(factory, memoryAllocator, cacheTracer, cursorTracerSupplier, versionContextSupplier, jobScheduler));
        }
示例#19
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void skipUpdatePullingSchedulingWithZeroInterval()
        public virtual void SkipUpdatePullingSchedulingWithZeroInterval()
        {
            JobScheduler          jobScheduler    = mock(typeof(JobScheduler));
            UpdatePullerScheduler pullerScheduler = new UpdatePullerScheduler(jobScheduler, NullLogProvider.Instance, _updatePuller, 0);

            // when start puller scheduler - nothing should be scheduled
            pullerScheduler.Init();

            verifyZeroInteractions(jobScheduler, _updatePuller);

            // should be able shutdown scheduler
            pullerScheduler.Shutdown();
        }
示例#20
0
        internal MetricsExtension(KernelContext kernelContext, MetricsKernelExtensionFactory.Dependencies dependencies)
        {
            LogService            logService    = dependencies.LogService();
            Config                configuration = dependencies.Configuration();
            FileSystemAbstraction fileSystem    = dependencies.FileSystemAbstraction();
            JobScheduler          scheduler     = dependencies.Scheduler();

            _logger = logService.GetUserLog(this.GetType());

            MetricRegistry registry = new MetricRegistry();

            _reporter     = (new EventReporterBuilder(configuration, registry, _logger, kernelContext, _life, fileSystem, scheduler, dependencies.PortRegister())).build();
            _metricsBuilt = (new Neo4jMetricsBuilder(registry, _reporter, configuration, logService, kernelContext, dependencies, _life)).build();
        }
示例#21
0
 public ParallelBatchImporter(DatabaseLayout directoryStructure, FileSystemAbstraction fileSystem, PageCache externalPageCache, Configuration config, LogService logService, ExecutionMonitor executionMonitor, AdditionalInitialIds additionalInitialIds, Config dbConfig, RecordFormats recordFormats, ImportLogic.Monitor monitor, JobScheduler jobScheduler)
 {
     this._externalPageCache    = externalPageCache;
     this._directoryStructure   = directoryStructure;
     this._fileSystem           = fileSystem;
     this._config               = config;
     this._logService           = logService;
     this._dbConfig             = dbConfig;
     this._recordFormats        = recordFormats;
     this._executionMonitor     = executionMonitor;
     this._additionalInitialIds = additionalInitialIds;
     this._monitor              = monitor;
     this._jobScheduler         = jobScheduler;
 }
示例#22
0
 public PullerFactory(RequestContextFactory requestContextFactory, Master master, LastUpdateTime lastUpdateTime, LogProvider logging, InstanceId serverId, InvalidEpochExceptionHandler invalidEpochHandler, long pullInterval, JobScheduler jobScheduler, DependencyResolver dependencyResolver, AvailabilityGuard availabilityGuard, HighAvailabilityMemberStateMachine memberStateMachine, Monitors monitors, Config config)
 {
     this._requestContextFactory = requestContextFactory;
     this._master              = master;
     this._lastUpdateTime      = lastUpdateTime;
     this._logging             = logging;
     this._serverId            = serverId;
     this._invalidEpochHandler = invalidEpochHandler;
     this._pullInterval        = pullInterval;
     this._jobScheduler        = jobScheduler;
     this._dependencyResolver  = dependencyResolver;
     this._availabilityGuard   = availabilityGuard;
     this._memberStateMachine  = memberStateMachine;
     this._monitors            = monitors;
     this._activeDatabaseName  = config.Get(GraphDatabaseSettings.active_database);
 }
示例#23
0
 internal DataCollector(Kernel kernel, JobScheduler jobScheduler, Monitors monitors, Org.Neo4j.Values.ValueMapper_JavaMapper valueMapper, Config config)
 {
     this.Kernel         = kernel;
     this.JobScheduler   = jobScheduler;
     this.ValueMapper    = valueMapper;
     this.QueryCollector = new QueryCollector(jobScheduler, config.Get(GraphDatabaseSettings.data_collector_max_recent_query_count), config.Get(GraphDatabaseSettings.data_collector_max_query_text_size));
     try
     {
         this.QueryCollector.collect(Collections.emptyMap());
     }
     catch (InvalidArgumentsException e)
     {
         throw new System.InvalidOperationException("An empty config cannot be invalid", e);
     }
     monitors.AddMonitorListener(QueryCollector);
 }
示例#24
0
        public override Lifecycle NewInstance(KernelContext context, Dependencies deps)
        {
            JobScheduler scheduler = deps.JobScheduler();
            DatabaseAvailabilityGuard databaseAvailabilityGuard = deps.AvailabilityGuard();
            PageCache             pageCache         = deps.PageCache();
            FileSystemAbstraction fs                = deps.FileSystemAbstraction();
            LogService            logService        = deps.LogService();
            NeoStoreDataSource    dataSourceManager = deps.DataSource;
            Log      log      = logService.GetInternalLog(typeof(PageCacheWarmer));
            Monitors monitors = deps.Monitors();
            PageCacheWarmerMonitor monitor = monitors.NewMonitor(typeof(PageCacheWarmerMonitor));

            monitors.AddMonitorListener(new PageCacheWarmerLoggingMonitor(log));
            Config config = deps.Config();

            return(new PageCacheWarmerKernelExtension(scheduler, databaseAvailabilityGuard, pageCache, fs, dataSourceManager, log, monitor, config));
        }
示例#25
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(timeout = 120_000) public void shouldBeAbleToStartAndStopWithoutSuccessfulJoin() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldBeAbleToStartAndStopWithoutSuccessfulJoin()
        {
            // Random members that does not exists, discovery will never succeed
            string initialHosts = "localhost:" + PortAuthority.allocatePort() + ",localhost:" + PortAuthority.allocatePort();
            Config config       = Config.defaults();

            config.augment(initial_discovery_members, initialHosts);
            config.Augment(CausalClusteringSettings.discovery_listen_address, "localhost:" + PortAuthority.allocatePort());

            JobScheduler jobScheduler = createInitialisedScheduler();
            InitialDiscoveryMembersResolver initialDiscoveryMemberResolver = new InitialDiscoveryMembersResolver(new NoOpHostnameResolver(), config);

            CoreTopologyService service = _discoveryServiceType.createFactory().coreTopologyService(config, new MemberId(System.Guid.randomUUID()), jobScheduler, NullLogProvider.Instance, NullLogProvider.Instance, initialDiscoveryMemberResolver, new TopologyServiceNoRetriesStrategy(), new Monitors());

            service.init();
            service.start();
            service.stop();
            service.shutdown();
        }
示例#26
0
        private RecordStorageEngine Get(FileSystemAbstraction fs, PageCache pageCache, IndexProvider indexProvider, DatabaseHealth databaseHealth, DatabaseLayout databaseLayout, System.Func <BatchTransactionApplierFacade, BatchTransactionApplierFacade> transactionApplierTransformer, Monitors monitors, LockService lockService)
        {
            IdGeneratorFactory    idGeneratorFactory          = new EphemeralIdGenerator.Factory();
            ExplicitIndexProvider explicitIndexProviderLookup = mock(typeof(ExplicitIndexProvider));

            when(explicitIndexProviderLookup.AllIndexProviders()).thenReturn(Iterables.empty());
            IndexConfigStore indexConfigStore = new IndexConfigStore(databaseLayout, fs);
            JobScheduler     scheduler        = _life.add(createScheduler());
            Config           config           = Config.defaults(GraphDatabaseSettings.default_schema_provider, indexProvider.ProviderDescriptor.name());

            Dependencies dependencies = new Dependencies();

            dependencies.SatisfyDependency(indexProvider);

            BufferingIdGeneratorFactory bufferingIdGeneratorFactory = new BufferingIdGeneratorFactory(idGeneratorFactory, Org.Neo4j.Kernel.impl.store.id.IdReuseEligibility_Fields.Always, new CommunityIdTypeConfigurationProvider());
            DefaultIndexProviderMap     indexProviderMap            = new DefaultIndexProviderMap(dependencies, config);
            NullLogProvider             nullLogProvider             = NullLogProvider.Instance;

            _life.add(indexProviderMap);
            return(_life.add(new ExtendedRecordStorageEngine(databaseLayout, config, pageCache, fs, nullLogProvider, nullLogProvider, mockedTokenHolders(), mock(typeof(SchemaState)), new StandardConstraintSemantics(), scheduler, mock(typeof(TokenNameLookup)), lockService, indexProviderMap, IndexingService.NO_MONITOR, databaseHealth, explicitIndexProviderLookup, indexConfigStore, new SynchronizedArrayIdOrderingQueue(), idGeneratorFactory, new BufferedIdController(bufferingIdGeneratorFactory, scheduler), transactionApplierTransformer, monitors, RecoveryCleanupWorkCollector.immediate(), OperationalMode.single)));
        }
示例#27
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldAwaitCancellationUnderRealScheduler() throws Throwable
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldAwaitCancellationUnderRealScheduler()
        {
            // given
            JobScheduler scheduler = createInitialisedScheduler();

            scheduler.Start();

            TimerService timerService = new TimerService(scheduler, FormattedLogProvider.toOutputStream(System.out));

            System.Threading.CountdownEvent started  = new System.Threading.CountdownEvent(1);
            System.Threading.CountdownEvent finished = new System.Threading.CountdownEvent(1);

            TimeoutHandler handlerA = timer =>
            {
                started.Signal();
                finished.await();
            };

            TimeoutHandler handlerB = timer => finished.Signal();

            Timer timerA = timerService.Create(Timers.TimerA, _group, handlerA);

            timerA.Set(fixedTimeout(0, SECONDS));
            started.await();

            Timer timerB = timerService.Create(Timers.TimerB, _group, handlerB);

            timerB.Set(fixedTimeout(2, SECONDS));

            // when
            timerA.Cancel(SYNC_WAIT);

            // then
            assertEquals(0, finished.CurrentCount);

            // cleanup
            scheduler.Stop();
            scheduler.Shutdown();
        }
 public override BatchImporter Instantiate(DatabaseLayout directoryStructure, FileSystemAbstraction fileSystem, PageCache externalPageCache, Configuration config, LogService logService, ExecutionMonitor executionMonitor, AdditionalInitialIds additionalInitialIds, Config dbConfig, RecordFormats recordFormats, ImportLogic.Monitor monitor, JobScheduler scheduler)
 {
     return(new ParallelBatchImporter(directoryStructure, fileSystem, externalPageCache, config, logService, executionMonitor, additionalInitialIds, dbConfig, recordFormats, monitor, scheduler));
 }
示例#29
0
 public BufferedIdController(BufferingIdGeneratorFactory bufferingIdGeneratorFactory, JobScheduler scheduler)
 {
     this._bufferingIdGeneratorFactory = bufferingIdGeneratorFactory;
     this._scheduler = scheduler;
 }
示例#30
0
        /// <param name="config"> </param>
        /// <param name="logProvider"> </param>
        /// <param name="jobScheduler"> </param>
        /// <param name="myself"> </param>
        /// <param name="remoteMembersResolver"> </param>
        /// <param name="topologyServiceRetryStrategy">
        /// @return </param>
        public virtual TopologyService TopologyService(Config config, LogProvider logProvider, JobScheduler jobScheduler, MemberId myself, RemoteMembersResolver remoteMembersResolver, TopologyServiceRetryStrategy topologyServiceRetryStrategy)
        {
            ConfigureHazelcast(config, logProvider);

            return(new HazelcastClient(new SecureHazelcastClientConnector(config, logProvider, this._sslPolicy, remoteMembersResolver), jobScheduler, logProvider, config, myself));
        }