use of org.neo4j.server.enterprise.helpers.EnterpriseServerBuilder in project neo4j by neo4j.
the class EnterpriseServerHelper method createServer.
private static EnterpriseNeoServer createServer(File databaseDir, boolean persistent) throws IOException {
EnterpriseServerBuilder builder = EnterpriseServerBuilder.server().usingDataDir(databaseDir.getAbsolutePath());
if (persistent) {
builder = (EnterpriseServerBuilder) builder.persistent();
}
builder.withDefaultDatabaseTuning();
EnterpriseNeoServer server = builder.build();
server.start();
return server;
}
Aggregations