Пример #1
0
        public virtual NeoStoreDataSource GetDataSource(DatabaseLayout databaseLayout, FileSystemAbstraction fs, PageCache pageCache, DependencyResolver otherCustomOverriddenDependencies)
        {
            ShutdownAnyRunning();

            StatementLocksFactory locksFactory   = mock(typeof(StatementLocksFactory));
            StatementLocks        statementLocks = mock(typeof(StatementLocks));

            Org.Neo4j.Kernel.impl.locking.Locks_Client locks = mock(typeof(Org.Neo4j.Kernel.impl.locking.Locks_Client));
            when(statementLocks.Optimistic()).thenReturn(locks);
            when(statementLocks.Pessimistic()).thenReturn(locks);
            when(locksFactory.NewInstance()).thenReturn(statementLocks);

            JobScheduler jobScheduler = mock(typeof(JobScheduler), RETURNS_MOCKS);
            Monitors     monitors     = new Monitors();

            Dependencies mutableDependencies = new Dependencies(otherCustomOverriddenDependencies);

            // Satisfy non-satisfied dependencies
            Config config = Dependency(mutableDependencies, typeof(Config), deps => Config.defaults());

            config.augment(default_schema_provider, EMPTY.ProviderDescriptor.name());
            LogService                  logService              = Dependency(mutableDependencies, typeof(LogService), deps => new SimpleLogService(NullLogProvider.Instance));
            IdGeneratorFactory          idGeneratorFactory      = Dependency(mutableDependencies, typeof(IdGeneratorFactory), deps => new DefaultIdGeneratorFactory(fs));
            IdTypeConfigurationProvider idConfigurationProvider = Dependency(mutableDependencies, typeof(IdTypeConfigurationProvider), deps => new CommunityIdTypeConfigurationProvider());
            DatabaseHealth              databaseHealth          = Dependency(mutableDependencies, typeof(DatabaseHealth), deps => new DatabaseHealth(mock(typeof(DatabasePanicEventGenerator)), NullLog.Instance));
            SystemNanoClock             clock = Dependency(mutableDependencies, typeof(SystemNanoClock), deps => Clocks.nanoClock());
            TransactionMonitor          transactionMonitor        = Dependency(mutableDependencies, typeof(TransactionMonitor), deps => new DatabaseTransactionStats());
            DatabaseAvailabilityGuard   databaseAvailabilityGuard = Dependency(mutableDependencies, typeof(DatabaseAvailabilityGuard), deps => new DatabaseAvailabilityGuard(DEFAULT_DATABASE_NAME, deps.resolveDependency(typeof(SystemNanoClock)), NullLog.Instance));

            Dependency(mutableDependencies, typeof(DiagnosticsManager), deps => new DiagnosticsManager(NullLog.Instance));
            Dependency(mutableDependencies, typeof(IndexProvider), deps => EMPTY);

            _dataSource = new NeoStoreDataSource(new TestDatabaseCreationContext(DEFAULT_DATABASE_NAME, databaseLayout, config, idGeneratorFactory, logService, mock(typeof(JobScheduler), RETURNS_MOCKS), mock(typeof(TokenNameLookup)), mutableDependencies, mockedTokenHolders(), locksFactory, mock(typeof(SchemaWriteGuard)), mock(typeof(TransactionEventHandlers)), IndexingService.NO_MONITOR, fs, transactionMonitor, databaseHealth, mock(typeof(LogFileCreationMonitor)), TransactionHeaderInformationFactory.DEFAULT, new CommunityCommitProcessFactory(), mock(typeof(InternalAutoIndexing)), mock(typeof(IndexConfigStore)), mock(typeof(ExplicitIndexProvider)), pageCache, new StandardConstraintSemantics(), monitors, new Tracers("null", NullLog.Instance, monitors, jobScheduler, clock), mock(typeof(Procedures)), Org.Neo4j.Io.pagecache.IOLimiter_Fields.Unlimited, databaseAvailabilityGuard, clock, new CanWrite(), new StoreCopyCheckPointMutex(), RecoveryCleanupWorkCollector.immediate(), new BufferedIdController(new BufferingIdGeneratorFactory(idGeneratorFactory, Org.Neo4j.Kernel.impl.store.id.IdReuseEligibility_Fields.Always, idConfigurationProvider), jobScheduler), DatabaseInfo.COMMUNITY, new TransactionVersionContextSupplier(), ON_HEAP, Collections.emptyList(), file => EMPTY_WATCHER, new GraphDatabaseFacade(), Iterables.empty()));
            return(_dataSource);
        }
Пример #2
0
        public ExecutingQuery(long queryId, ClientConnectionInfo clientConnection, string username, string queryText, MapValue queryParameters, IDictionary <string, object> transactionAnnotationData, System.Func <long> activeLockCount, PageCursorCounters pageCursorCounters, long threadExecutingTheQueryId, string threadExecutingTheQueryName, SystemNanoClock clock, CpuClock cpuClock, HeapAllocation heapAllocation)
        {
            if (!InstanceFieldsInitialized)
            {
                InitializeInstanceFields();
                InstanceFieldsInitialized = true;
            }
            // Capture timestamps first
            this._cpuTimeNanosWhenQueryStarted = cpuClock.CpuTimeNanos(threadExecutingTheQueryId);
            this._startTimeNanos       = clock.Nanos();
            this._startTimestampMillis = clock.Millis();
            // then continue with assigning fields
            this._queryId            = queryId;
            this._clientConnection   = clientConnection;
            this._pageCursorCounters = pageCursorCounters;
            this._username           = username;

            ISet <string> passwordParams = new HashSet <string>();

            this._queryText                   = QueryObfuscation.ObfuscateText(queryText, passwordParams);
            this._queryParameters             = QueryObfuscation.ObfuscateParams(queryParameters, passwordParams);
            this._transactionAnnotationData   = transactionAnnotationData;
            this._activeLockCount             = activeLockCount;
            this._initialActiveLocks          = activeLockCount();
            this._threadExecutingTheQueryId   = threadExecutingTheQueryId;
            this._threadExecutingTheQueryName = threadExecutingTheQueryName;
            this._cpuClock       = cpuClock;
            this._heapAllocation = heapAllocation;
            this._clock          = clock;
            this._heapAllocatedBytesWhenQueryStarted = heapAllocation.AllocatedBytes(this._threadExecutingTheQueryId);
        }
Пример #3
0
        internal ModularDatabaseCreationContext(string databaseName, PlatformModule platformModule, DatabaseEditionContext editionContext, Procedures procedures, GraphDatabaseFacade facade)
        {
            this._databaseName = databaseName;
            this._config       = platformModule.Config;
            DatabaseIdContext idContext = editionContext.IdContext;

            this._idGeneratorFactory = idContext.IdGeneratorFactory;
            this._idController       = idContext.IdController;
            this._databaseLayout     = platformModule.StoreLayout.databaseLayout(databaseName);
            this._logService         = platformModule.Logging;
            this._scheduler          = platformModule.JobScheduler;
            this._globalDependencies = platformModule.Dependencies;
            this._tokenHolders       = editionContext.CreateTokenHolders();
            this._tokenNameLookup    = new NonTransactionalTokenNameLookup(_tokenHolders);
            this._locks = editionContext.CreateLocks();
            this._statementLocksFactory    = editionContext.CreateStatementLocksFactory();
            this._schemaWriteGuard         = editionContext.SchemaWriteGuard;
            this._transactionEventHandlers = new TransactionEventHandlers(facade);
            this._monitors = new Monitors(platformModule.Monitors);
            this._indexingServiceMonitor = _monitors.newMonitor(typeof(IndexingService.Monitor));
            this._physicalLogMonitor     = _monitors.newMonitor(typeof(LogFileCreationMonitor));
            this._fs = platformModule.FileSystem;
            this._transactionStats = editionContext.CreateTransactionMonitor();
            this._databaseHealth   = new DatabaseHealth(platformModule.PanicEventGenerator, _logService.getInternalLog(typeof(DatabaseHealth)));
            this._transactionHeaderInformationFactory = editionContext.HeaderInformationFactory;
            this._commitProcessFactory  = editionContext.CommitProcessFactory;
            this._autoIndexing          = new InternalAutoIndexing(platformModule.Config, _tokenHolders.propertyKeyTokens());
            this._indexConfigStore      = new IndexConfigStore(_databaseLayout, _fs);
            this._explicitIndexProvider = new DefaultExplicitIndexProvider();
            this._pageCache             = platformModule.PageCache;
            this._constraintSemantics   = editionContext.ConstraintSemantics;
            this._tracers    = platformModule.Tracers;
            this._procedures = procedures;
            this._ioLimiter  = editionContext.IoLimiter;
            this._clock      = platformModule.Clock;
            this._databaseAvailabilityGuard    = editionContext.CreateDatabaseAvailabilityGuard(_clock, _logService, _config);
            this._databaseAvailability         = new DatabaseAvailability(_databaseAvailabilityGuard, _transactionStats, platformModule.Clock, AwaitActiveTransactionDeadlineMillis);
            this._coreAPIAvailabilityGuard     = new CoreAPIAvailabilityGuard(_databaseAvailabilityGuard, editionContext.TransactionStartTimeout);
            this._accessCapability             = editionContext.AccessCapability;
            this._storeCopyCheckPointMutex     = new StoreCopyCheckPointMutex();
            this._recoveryCleanupWorkCollector = platformModule.RecoveryCleanupWorkCollector;
            this._databaseInfo               = platformModule.DatabaseInfo;
            this._versionContextSupplier     = platformModule.VersionContextSupplier;
            this._collectionsFactorySupplier = platformModule.CollectionsFactorySupplier;
            this._kernelExtensionFactories   = platformModule.KernelExtensionFactories;
            this._watcherServiceFactory      = editionContext.WatcherServiceFactory;
            this._facade          = facade;
            this._engineProviders = platformModule.EngineProviders;
        }
 internal KernelTransactionImplementationHandle(KernelTransactionImplementation tx, SystemNanoClock clock)
 {
     this._txReuseCount = tx.ReuseCount;
     this._lastTransactionIdWhenStarted        = tx.LastTransactionIdWhenStarted();
     this._lastTransactionTimestampWhenStarted = tx.LastTransactionTimestampWhenStarted();
     this._startTime         = tx.StartTime();
     this._startTimeNanos    = tx.StartTimeNanos();
     this._timeoutMillis     = tx.Timeout();
     this._subject           = tx.SubjectOrAnonymous();
     this._terminationReason = tx.ReasonIfTerminated;
     this._executingQueries  = tx.ExecutingQueries();
     this._metaData          = tx.MetaData;
     this._userTransactionId = tx.UserTransactionId();
     this._tx    = tx;
     this._clock = clock;
 }
Пример #5
0
 public KernelTransactions(Config config, StatementLocksFactory statementLocksFactory, ConstraintIndexCreator constraintIndexCreator, StatementOperationParts statementOperations, SchemaWriteGuard schemaWriteGuard, TransactionHeaderInformationFactory txHeaderFactory, TransactionCommitProcess transactionCommitProcess, AuxiliaryTransactionStateManager auxTxStateManager, TransactionHooks hooks, TransactionMonitor transactionMonitor, AvailabilityGuard databaseAvailabilityGuard, Tracers tracers, StorageEngine storageEngine, Procedures procedures, TransactionIdStore transactionIdStore, SystemNanoClock clock, AtomicReference <CpuClock> cpuClockRef, AtomicReference <HeapAllocation> heapAllocationRef, AccessCapability accessCapability, AutoIndexing autoIndexing, ExplicitIndexStore explicitIndexStore, VersionContextSupplier versionContextSupplier, CollectionsFactorySupplier collectionsFactorySupplier, ConstraintSemantics constraintSemantics, SchemaState schemaState, IndexingService indexingService, TokenHolders tokenHolders, string currentDatabaseName, Dependencies dataSourceDependencies)
 {
     if (!InstanceFieldsInitialized)
     {
         InitializeInstanceFields();
         InstanceFieldsInitialized = true;
     }
     this._config = config;
     this._statementLocksFactory  = statementLocksFactory;
     this._constraintIndexCreator = constraintIndexCreator;
     this._statementOperations    = statementOperations;
     this._schemaWriteGuard       = schemaWriteGuard;
     this._transactionHeaderInformationFactory = txHeaderFactory;
     this._transactionCommitProcess            = transactionCommitProcess;
     this._auxTxStateManager         = auxTxStateManager;
     this._hooks                     = hooks;
     this._transactionMonitor        = transactionMonitor;
     this._databaseAvailabilityGuard = databaseAvailabilityGuard;
     this._tracers                   = tracers;
     this._storageEngine             = storageEngine;
     this._procedures                = procedures;
     this._transactionIdStore        = transactionIdStore;
     this._cpuClockRef               = cpuClockRef;
     this._heapAllocationRef         = heapAllocationRef;
     this._accessCapability          = accessCapability;
     this._autoIndexing              = autoIndexing;
     this._explicitIndexStore        = explicitIndexStore;
     this._indexingService           = indexingService;
     this._tokenHolders              = tokenHolders;
     this._currentDatabaseName       = currentDatabaseName;
     this._dataSourceDependencies    = dataSourceDependencies;
     this._versionContextSupplier    = versionContextSupplier;
     this._clock                     = clock;
     DoBlockNewTransactions();
     this._collectionsFactorySupplier = collectionsFactorySupplier;
     this._constraintSemantics        = constraintSemantics;
     this._schemaState = schemaState;
 }
Пример #6
0
 internal TimeBasedTaskScheduler(SystemNanoClock clock, ThreadPoolManager pools)
 {
     this._clock   = clock;
     this._pools   = pools;
     _delayedTasks = new PriorityBlockingQueue <ScheduledJobHandle>(42, _deadlineComparator);
 }
Пример #7
0
 private CountsTracker NewTracker(SystemNanoClock clock, VersionContextSupplier versionContextSupplier)
 {
     return((new CountsTracker(ResourceManager.logProvider(), ResourceManager.fileSystem(), ResourceManager.pageCache(), Config.defaults(), ResourceManager.testDirectory().databaseLayout(), clock, versionContextSupplier)).setInitializer(new DataInitializerAnonymousInnerClass(this)));
 }
Пример #8
0
 public KernelTransactionMonitor(KernelTransactions kernelTransactions, SystemNanoClock clock, LogService logService)
 {
     this._kernelTransactions = kernelTransactions;
     this._clock = clock;
     this._log   = logService.GetInternalLog(typeof(KernelTransactionMonitor));
 }
Пример #9
0
//JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected:
//ORIGINAL LINE: public CountsTracker(final org.neo4j.logging.LogProvider logProvider, org.neo4j.io.fs.FileSystemAbstraction fs, org.neo4j.io.pagecache.PageCache pages, org.neo4j.kernel.configuration.Config config, org.neo4j.io.layout.DatabaseLayout databaseLayout, org.neo4j.time.SystemNanoClock clock, org.neo4j.io.pagecache.tracing.cursor.context.VersionContextSupplier versionContextSupplier)
        public CountsTracker(LogProvider logProvider, FileSystemAbstraction fs, PageCache pages, Config config, DatabaseLayout databaseLayout, SystemNanoClock clock, VersionContextSupplier versionContextSupplier) : base(fs, pages, databaseLayout, new CountsTrackerRotationMonitor(logProvider), logProvider.GetLog(typeof(CountsTracker)).infoLogger(), new RotationTimerFactory(clock, config.Get(counts_store_rotation_timeout).toMillis()), versionContextSupplier, 16, 16, _headerFields)
        {
        }
Пример #10
0
 public ClockContext(SystemNanoClock clock)
 {
     this._system = Objects.requireNonNull(clock, "system clock");
 }
Пример #11
0
 public StackingQueryRegistrationOperations(SystemNanoClock clock, AtomicReference <CpuClock> cpuClockRef, AtomicReference <HeapAllocation> heapAllocationRef)
 {
     this._clock             = clock;
     this._cpuClockRef       = cpuClockRef;
     this._heapAllocationRef = heapAllocationRef;
 }
Пример #12
0
 internal TestKernelTransactions(StatementLocksFactory statementLocksFactory, ConstraintIndexCreator constraintIndexCreator, StatementOperationParts statementOperations, SchemaWriteGuard schemaWriteGuard, TransactionHeaderInformationFactory txHeaderFactory, TransactionCommitProcess transactionCommitProcess, AuxiliaryTransactionStateManager auxTxStateManager, TransactionHooks hooks, TransactionMonitor transactionMonitor, AvailabilityGuard databaseAvailabilityGuard, Tracers tracers, StorageEngine storageEngine, Procedures procedures, TransactionIdStore transactionIdStore, SystemNanoClock clock, AccessCapability accessCapability, AutoIndexing autoIndexing, VersionContextSupplier versionContextSupplier, TokenHolders tokenHolders, Dependencies dataSourceDependencies) : base(Config.defaults(), statementLocksFactory, constraintIndexCreator, statementOperations, schemaWriteGuard, txHeaderFactory, transactionCommitProcess, auxTxStateManager, hooks, transactionMonitor, databaseAvailabilityGuard, tracers, storageEngine, procedures, transactionIdStore, clock, new AtomicReference <CpuClock>(CpuClock.NOT_AVAILABLE), new AtomicReference <HeapAllocation>(HeapAllocation.NOT_AVAILABLE), accessCapability, autoIndexing, mock(typeof(ExplicitIndexStore)), versionContextSupplier, ON_HEAP, new StandardConstraintSemantics(), mock(typeof(SchemaState)), mock(typeof(IndexingService)), tokenHolders, DEFAULT_DATABASE_NAME, dataSourceDependencies)
 {
 }
Пример #13
0
 private static TestKernelTransactions CreateTestTransactions(StorageEngine storageEngine, TransactionCommitProcess commitProcess, TransactionIdStore transactionIdStore, Tracers tracers, StatementLocksFactory statementLocksFactory, StatementOperationParts statementOperations, SystemNanoClock clock, AvailabilityGuard databaseAvailabilityGuard)
 {
     return(new TestKernelTransactions(statementLocksFactory, null, statementOperations, null, DEFAULT, commitProcess, mock(typeof(AuxiliaryTransactionStateManager)), new TransactionHooks(), mock(typeof(TransactionMonitor)), databaseAvailabilityGuard, tracers, storageEngine, new Procedures(), transactionIdStore, clock, new CanWrite(), AutoIndexing.UNSUPPORTED, EmptyVersionContextSupplier.EMPTY, mockedTokenHolders(), new Dependencies()));
 }
Пример #14
0
 private static KernelTransactions CreateTransactions(StorageEngine storageEngine, TransactionCommitProcess commitProcess, TransactionIdStore transactionIdStore, Tracers tracers, StatementLocksFactory statementLocksFactory, StatementOperationParts statementOperations, SystemNanoClock clock, AvailabilityGuard databaseAvailabilityGuard)
 {
     return(new KernelTransactions(Config.defaults(), statementLocksFactory, null, statementOperations, null, DEFAULT, commitProcess, mock(typeof(AuxiliaryTransactionStateManager)), new TransactionHooks(), mock(typeof(TransactionMonitor)), databaseAvailabilityGuard, tracers, storageEngine, new Procedures(), transactionIdStore, clock, new AtomicReference <CpuClock>(CpuClock.NOT_AVAILABLE), new AtomicReference <HeapAllocation>(HeapAllocation.NOT_AVAILABLE), new CanWrite(), AutoIndexing.UNSUPPORTED, mock(typeof(ExplicitIndexStore)), EmptyVersionContextSupplier.EMPTY, ON_HEAP, mock(typeof(ConstraintSemantics)), mock(typeof(SchemaState)), mock(typeof(IndexingService)), mockedTokenHolders(), DEFAULT_DATABASE_NAME, new Dependencies()));
 }
Пример #15
0
 public virtual TestGraphDatabaseFactory setClock(SystemNanoClock clock)
 {
     CurrentState.Clock = clock;
     return(this);
 }
Пример #16
0
        /// <summary>
        /// Create a Tracers subsystem with the desired implementation, if it can be found and created.
        ///
        /// Otherwise the default implementation is used, and a warning is logged to the given StringLogger. </summary>
        /// <param name="desiredImplementationName"> The name of the desired {@link org.neo4j.kernel.monitoring.tracing
        /// .TracerFactory} implementation, as given by its <seealso cref="TracerFactory.getImplementationName()"/> method. </param>
        /// <param name="msgLog"> A <seealso cref="Log"/> for logging when the desired implementation cannot be created. </param>
        /// <param name="monitors"> the monitoring manager </param>
        /// <param name="jobScheduler"> a scheduler for async jobs </param>
        public Tracers(string desiredImplementationName, Log msgLog, Monitors monitors, JobScheduler jobScheduler, SystemNanoClock clock)
        {
            if ("null".Equals(desiredImplementationName, StringComparison.OrdinalIgnoreCase))
            {
                PageCursorTracerSupplier = DefaultPageCursorTracerSupplier.NULL;
                PageCacheTracer          = PageCacheTracer.NULL;
                TransactionTracer        = Org.Neo4j.Kernel.impl.transaction.tracing.TransactionTracer_Fields.Null;
                CheckPointTracer         = Org.Neo4j.Kernel.impl.transaction.tracing.CheckPointTracer_Fields.Null;
                LockTracer = LockTracer.NONE;
            }
            else
            {
                TracerFactory foundFactory = new DefaultTracerFactory();
                bool          found        = string.ReferenceEquals(desiredImplementationName, null);
                foreach (TracerFactory factory in Service.load(typeof(TracerFactory)))
                {
                    try
                    {
                        if (factory.ImplementationName.Equals(desiredImplementationName, StringComparison.OrdinalIgnoreCase))
                        {
                            foundFactory = factory;
                            found        = true;
                            break;
                        }
                    }
                    catch (Exception e)
                    {
                        msgLog.Warn("Failed to instantiate desired tracer implementations '" + desiredImplementationName + "'", e);
                    }
                }

                if (!found)
                {
                    msgLog.Warn("Using default tracer implementations instead of '%s'", desiredImplementationName);
                }

                PageCursorTracerSupplier = foundFactory.CreatePageCursorTracerSupplier(monitors, jobScheduler);
                PageCacheTracer          = foundFactory.CreatePageCacheTracer(monitors, jobScheduler, clock, msgLog);
                TransactionTracer        = foundFactory.CreateTransactionTracer(monitors, jobScheduler);
                CheckPointTracer         = foundFactory.CreateCheckPointTracer(monitors, jobScheduler);
                LockTracer = foundFactory.CreateLockTracer(monitors, jobScheduler);
            }
        }
Пример #17
0
                protected internal override SystemNanoClock CreateClock()
                {
                    SystemNanoClock clock = outerInstance.State.clock();

                    return(clock != null ? clock : base.CreateClock());
                }
Пример #18
0
        public PlatformModule(File providedStoreDir, Config config, DatabaseInfo databaseInfo, GraphDatabaseFacadeFactory.Dependencies externalDependencies)
        {
            this.DatabaseInfo      = databaseInfo;
            this.DataSourceManager = new DataSourceManager(config);
            Dependencies           = new Dependencies();
            Dependencies.satisfyDependency(databaseInfo);

            Clock = Dependencies.satisfyDependency(CreateClock());
            Life  = Dependencies.satisfyDependency(CreateLife());

            this.StoreLayout = StoreLayout.of(providedStoreDir);

            config.AugmentDefaults(GraphDatabaseSettings.neo4j_home, StoreLayout.storeDirectory().Path);
            this.Config = Dependencies.satisfyDependency(config);

            FileSystem = Dependencies.satisfyDependency(CreateFileSystemAbstraction());
            Life.add(new FileSystemLifecycleAdapter(FileSystem));

            // Component monitoring
            Monitors = externalDependencies.Monitors() == null ? new Monitors() : externalDependencies.Monitors();
            Dependencies.satisfyDependency(Monitors);

            JobScheduler = Life.add(Dependencies.satisfyDependency(CreateJobScheduler()));
            StartDeferredExecutors(JobScheduler, externalDependencies.DeferredExecutors());

            // Cleanup after recovery, used by GBPTree, added to life in NeoStoreDataSource
            RecoveryCleanupWorkCollector = new GroupingRecoveryCleanupWorkCollector(JobScheduler);
            Dependencies.satisfyDependency(RecoveryCleanupWorkCollector);

            // Database system information, used by UDC
            UsageData = new UsageData(JobScheduler);
            Dependencies.satisfyDependency(Life.add(UsageData));

            // If no logging was passed in from the outside then create logging and register
            // with this life
            Logging = Dependencies.satisfyDependency(CreateLogService(externalDependencies.UserLogProvider()));

            config.Logger = Logging.getInternalLog(typeof(Config));

            Life.add(Dependencies.satisfyDependency(new StoreLockerLifecycleAdapter(CreateStoreLocker())));

            (new JvmChecker(Logging.getInternalLog(typeof(JvmChecker)), new JvmMetadataRepository())).checkJvmCompatibilityAndIssueWarning();

            string desiredImplementationName = config.Get(GraphDatabaseSettings.tracer);

            Tracers = Dependencies.satisfyDependency(new Tracers(desiredImplementationName, Logging.getInternalLog(typeof(Tracers)), Monitors, JobScheduler, Clock));
            Dependencies.satisfyDependency(Tracers.pageCacheTracer);
            Dependencies.satisfyDependency(FirstImplementor(typeof(LogRotationMonitor), Tracers.transactionTracer, LogRotationMonitor.NULL));
            Dependencies.satisfyDependency(FirstImplementor(typeof(CheckPointerMonitor), Tracers.checkPointTracer, CheckPointerMonitor.NULL));

            VersionContextSupplier = CreateCursorContextSupplier(config);

            CollectionsFactorySupplier = CreateCollectionsFactorySupplier(config, Life);

            Dependencies.satisfyDependency(VersionContextSupplier);
            PageCache = Dependencies.satisfyDependency(CreatePageCache(FileSystem, config, Logging, Tracers, VersionContextSupplier, JobScheduler));

            Life.add(new PageCacheLifecycle(PageCache));

            DiagnosticsManager = Life.add(Dependencies.satisfyDependency(new DiagnosticsManager(Logging.getInternalLog(typeof(DiagnosticsManager)))));
            SystemDiagnostics.registerWith(DiagnosticsManager);

            Dependencies.satisfyDependency(DataSourceManager);

            KernelExtensionFactories = externalDependencies.KernelExtensions();
            EngineProviders          = externalDependencies.ExecutionEngines();
            GlobalKernelExtensions   = Dependencies.satisfyDependency(new GlobalKernelExtensions(new SimpleKernelContext(StoreLayout.storeDirectory(), databaseInfo, Dependencies), KernelExtensionFactories, Dependencies, KernelExtensionFailureStrategies.fail()));

            UrlAccessRule = Dependencies.satisfyDependency(URLAccessRules.combined(externalDependencies.UrlAccessRules()));

            ConnectorPortRegister = new ConnectorPortRegister();
            Dependencies.satisfyDependency(ConnectorPortRegister);

            EventHandlers       = new KernelEventHandlers(Logging.getInternalLog(typeof(KernelEventHandlers)));
            PanicEventGenerator = new DatabasePanicEventGenerator(EventHandlers);

            PublishPlatformInfo(Dependencies.resolveDependency(typeof(UsageData)));
        }