Esempio n. 1
0
        private static GraphDatabaseFactoryState HighlyAvailableFactoryState()
        {
            GraphDatabaseFactoryState state = new GraphDatabaseFactoryState();

            state.AddSettingsClasses(asList(typeof(ClusterSettings), typeof(HaSettings)));
            return(state);
        }
Esempio n. 2
0
        private GraphDatabaseService NewEmbeddedGraphDatabaseWithSlowJobScheduler(Config config)
        {
            GraphDatabaseFactoryState graphDatabaseFactoryState = new GraphDatabaseFactoryState();

            graphDatabaseFactoryState.UserLogProvider = NullLogService.Instance.UserLogProvider;
            return(new GraphDatabaseFacadeFactoryAnonymousInnerClass(this, DatabaseInfo.COMMUNITY, config)
                   .newFacade(Resources.directory().storeDir(), config, graphDatabaseFactoryState.DatabaseDependencies()));
        }
Esempio n. 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldIncludeCorrectSettingsClasses()
        public virtual void ShouldIncludeCorrectSettingsClasses()
        {
            // When
            GraphDatabaseFactoryState state = (new HighlyAvailableGraphDatabaseFactory()).CurrentState;

            // Then
            assertThat(state.DatabaseDependencies().settingsClasses(), containsInAnyOrder(typeof(GraphDatabaseSettings), typeof(HaSettings), typeof(ClusterSettings)));
        }
Esempio n. 4
0
        /// <param name="storeDir"> desired embedded database store dir </param>
        public virtual GraphDatabaseBuilder NewEmbeddedDatabaseBuilder(File storeDir)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final GraphDatabaseFactoryState state = getStateCopy();
            GraphDatabaseFactoryState state = StateCopy;

            GraphDatabaseBuilder.DatabaseCreator creator = CreateDatabaseCreator(storeDir, state);
            GraphDatabaseBuilder builder = CreateGraphDatabaseBuilder(creator);

            Configure(builder);
            return(builder);
        }
Esempio n. 5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void mustBeAbleToRemoveAddedKernelExtensions()
        internal virtual void MustBeAbleToRemoveAddedKernelExtensions()
        {
            DummyExtensionFactory     extensionFactory = new DummyExtensionFactory();
            GraphDatabaseFactoryState state            = new GraphDatabaseFactoryState();
            long initialCount = count(state.KernelExtension);

            state.AddKernelExtensions(Collections.singleton(extensionFactory));
            assertThat(count(state.KernelExtension), @is(initialCount + 1));

            state.RemoveKernelExtensions(e => e == extensionFactory);
            assertThat(count(state.KernelExtension), @is(initialCount));
        }
Esempio n. 6
0
        private GraphDatabaseService CreateDb()
        {
            GraphDatabaseFactoryState state = new GraphDatabaseFactoryState();

            return new GraphDatabaseFacadeFactory(DatabaseInfo.COMMUNITY, platformModule => new CommunityEditionModuleAnonymousInnerClass(this, platformModule))
        }
Esempio n. 7
0
 protected internal GraphDatabaseFactory(GraphDatabaseFactoryState state)
 {
     this._state = state;
 }
Esempio n. 8
0
 internal EmbeddedDatabaseCreator(GraphDatabaseFactory outerInstance, File storeDir, GraphDatabaseFactoryState state)
 {
     this._outerInstance = outerInstance;
     this.StoreDir       = storeDir;
     this.State          = state;
 }
Esempio n. 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: protected GraphDatabaseBuilder.DatabaseCreator createDatabaseCreator(final java.io.File storeDir, final GraphDatabaseFactoryState state)
        protected internal virtual GraphDatabaseBuilder.DatabaseCreator CreateDatabaseCreator(File storeDir, GraphDatabaseFactoryState state)
        {
            return(new EmbeddedDatabaseCreator(this, storeDir, state));
        }
Esempio n. 10
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: protected GraphDatabaseBuilder.DatabaseCreator createDatabaseCreator(final java.io.File storeDir, final GraphDatabaseFactoryState state)
        protected internal override GraphDatabaseBuilder.DatabaseCreator CreateDatabaseCreator(File storeDir, GraphDatabaseFactoryState state)
        {
            return(new DatabaseCreatorAnonymousInnerClass(this, storeDir, state));
        }
Esempio n. 11
0
 public DatabaseCreatorAnonymousInnerClass(CustomGraphDatabaseFactory outerInstance, File storeDir, GraphDatabaseFactoryState state)
 {
     this.outerInstance = outerInstance;
     this._storeDir     = storeDir;
     this._state        = state;
 }