Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
        public DataSourceModule(string databaseName, PlatformModule platformModule, AbstractEditionModule editionModule, Procedures procedures, GraphDatabaseFacade graphDatabaseFacade)
        {
            platformModule.DiagnosticsManager.prependProvider(platformModule.Config);
            DatabaseEditionContext         editionContext = editionModule.CreateDatabaseContext(databaseName);
            ModularDatabaseCreationContext context        = new ModularDatabaseCreationContext(databaseName, platformModule, editionContext, procedures, graphDatabaseFacade);

            NeoStoreDataSource = new NeoStoreDataSource(context);

            this.CoreAPIAvailabilityGuardConflict = context.CoreAPIAvailabilityGuard;
            this.StoreId   = NeoStoreDataSource.getStoreId;
            this.KernelAPI = NeoStoreDataSource.getKernel;

            ProcedureGDSFactory gdsFactory = new ProcedureGDSFactory(platformModule, this, CoreAPIAvailabilityGuardConflict, context.TokenHolders, editionModule.ThreadToTransactionBridge);

            procedures.RegisterComponent(typeof(GraphDatabaseService), gdsFactory.apply, true);
        }
Ejemplo n.º 3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void setup(Dependencies dependencies) throws org.neo4j.internal.kernel.api.exceptions.KernelException
        public override void Setup(Dependencies dependencies)
        {
            Config                config      = dependencies.Config();
            Procedures            procedures  = dependencies.Procedures();
            LogProvider           logProvider = dependencies.LogService().UserLogProvider;
            FileSystemAbstraction fileSystem  = dependencies.FileSystem();
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final UserRepository userRepository = getUserRepository(config, logProvider, fileSystem);
            UserRepository userRepository = GetUserRepository(config, logProvider, fileSystem);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final UserRepository initialUserRepository = getInitialUserRepository(config, logProvider, fileSystem);
            UserRepository initialUserRepository = GetInitialUserRepository(config, logProvider, fileSystem);

//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.kernel.api.security.PasswordPolicy passwordPolicy = new BasicPasswordPolicy();
            PasswordPolicy passwordPolicy = new BasicPasswordPolicy();

            _authManager = new BasicAuthManager(userRepository, passwordPolicy, Clocks.systemClock(), initialUserRepository, config);

            Life.add(dependencies.DependencySatisfier().satisfyDependency(_authManager));

            procedures.RegisterComponent(typeof(UserManager), ctx => _authManager, false);
            procedures.RegisterProcedure(typeof(AuthProcedures));
        }