Search in sources :

Example 1 with EnterpriseDatabaseManagementServiceBuilder

use of com.neo4j.dbms.api.EnterpriseDatabaseManagementServiceBuilder in project neo4j-documentation by neo4j.

the class TestBackup method before.

@Before
public void before() throws IOException {
    Files.createDirectories(backupDirectory);
    managementService = new EnterpriseDatabaseManagementServiceBuilder(databaseDirectory).setConfig(Collections.singletonMap(OnlineBackupSettings.online_backup_listen_address, new SocketAddress("127.0.0.1", backupPort))).build();
}
Also used : EnterpriseDatabaseManagementServiceBuilder(com.neo4j.dbms.api.EnterpriseDatabaseManagementServiceBuilder) SocketAddress(org.neo4j.configuration.helpers.SocketAddress) Before(org.junit.Before)

Example 2 with EnterpriseDatabaseManagementServiceBuilder

use of com.neo4j.dbms.api.EnterpriseDatabaseManagementServiceBuilder in project neo4j-documentation by neo4j.

the class Neo4jInstance method newEnterpriseInstance.

public DatabaseManagementService newEnterpriseInstance() throws IOException {
    Files.createDirectories(baseDatabaseDirectory);
    DatabaseManagementService managementService = new EnterpriseDatabaseManagementServiceBuilder(databaseDirectory()).setConfig(Map.of(OnlineBackupSettings.online_backup_listen_address, new SocketAddress("127.0.0.1", 0), OnlineBackupSettings.online_backup_enabled, java.lang.Boolean.FALSE, GraphDatabaseSettings.auth_enabled, true)).build();
    registerShutdownHook(managementService);
    return managementService;
}
Also used : EnterpriseDatabaseManagementServiceBuilder(com.neo4j.dbms.api.EnterpriseDatabaseManagementServiceBuilder) SocketAddress(org.neo4j.configuration.helpers.SocketAddress) DatabaseManagementService(org.neo4j.dbms.api.DatabaseManagementService)

Aggregations

EnterpriseDatabaseManagementServiceBuilder (com.neo4j.dbms.api.EnterpriseDatabaseManagementServiceBuilder)2 SocketAddress (org.neo4j.configuration.helpers.SocketAddress)2 Before (org.junit.Before)1 DatabaseManagementService (org.neo4j.dbms.api.DatabaseManagementService)1