Search in sources :

Example 1 with DatabaseId

use of org.neo4j.kernel.database.DatabaseId in project neo4j by neo4j.

the class LocalGraphTransactionIdTracker method getNamedDatabaseId.

private NamedDatabaseId getNamedDatabaseId(Location.Local location) {
    DatabaseId databaseId = DatabaseIdFactory.from(location.getUuid());
    var namedDatabaseId = databaseIdRepository.getById(databaseId);
    if (namedDatabaseId.isEmpty()) {
        // this can only happen when the database has just been deleted or someone tempered with a bookmark
        throw new IllegalArgumentException("A local graph could not be mapped to a database");
    }
    return namedDatabaseId.get();
}
Also used : NamedDatabaseId(org.neo4j.kernel.database.NamedDatabaseId) DatabaseId(org.neo4j.kernel.database.DatabaseId)

Aggregations

DatabaseId (org.neo4j.kernel.database.DatabaseId)1 NamedDatabaseId (org.neo4j.kernel.database.NamedDatabaseId)1