예제 #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public static org.neo4j.server.NeoServer createReadOnlyServer(java.io.File path) throws java.io.IOException
        public static NeoServer CreateReadOnlyServer(File path)
        {
            // Start writable server to create all store files needed
            CommunityServerBuilder builder = CommunityServerBuilder.Server();

            builder.WithProperty("dbms.connector.bolt.listen_address", ":0");
            CreateServer(builder, true, path).stop();
            // Then start server in read only mode
            builder.WithProperty(GraphDatabaseSettings.read_only.name(), "true");
            return(CreateServer(builder, true, path));
        }
예제 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private static org.neo4j.server.NeoServer createServer(CommunityServerBuilder builder, boolean persistent, java.io.File path) throws java.io.IOException
        private static NeoServer CreateServer(CommunityServerBuilder builder, bool persistent, File path)
        {
            if (persistent)
            {
                builder = builder.Persistent();
            }
            builder.OnRandomPorts();
            NeoServer server = builder.UsingDataDir(path != null ? path.AbsolutePath : null).build();

            server.Start();
            return(server);
        }
예제 #3
0
 internal TestCommunityNeoServer(CommunityServerBuilder outerInstance, Config config, File configFile, GraphDatabaseFacadeFactory.Dependencies dependencies) : base(config, outerInstance.persistent ? new CommunityGraphFactory() : new InMemoryGraphFactory(), dependencies)
 {
     this._outerInstance = outerInstance;
     this.ConfigFile     = configFile;
 }
예제 #4
0
 public PreFlightTasksAnonymousInnerClass(CommunityServerBuilder outerInstance, NullLogProvider getInstance) : base(getInstance)
 {
     this.outerInstance = outerInstance;
 }
예제 #5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public static org.neo4j.server.NeoServer createNonPersistentServer() throws java.io.IOException
        public static NeoServer CreateNonPersistentServer()
        {
            return(CreateServer(CommunityServerBuilder.Server(), false, null));
        }