Module org.neo4j.driver
Interface RoutingTableRegistry
- All Known Implementing Classes:
RoutingTableRegistryImpl
public interface RoutingTableRegistry
A generic interface to access all routing tables as a whole.
It also provides methods to obtain a routing table or manage a routing table for a specified database.
-
Method Summary
Modifier and TypeMethodDescriptionensureRoutingTable(SecurityPlan securityPlan, CompletableFuture<DatabaseName> databaseNameFuture, AccessMode mode, Set<String> rediscoveryBookmarks, String impersonatedUser, Supplier<CompletionStage<Map<String, Value>>> authMapStageSupplier, BoltProtocolVersion minVersion) Ensures the routing table for the database with given access mode.getRoutingTableHandler(DatabaseName databaseName) Returns routing table handler for the given database name if it exists in the registry.voidremove(DatabaseName databaseName) Removes a routing table of the given database from registry.voidRemoves all routing tables that has been not used for a long time.
-
Method Details
-
ensureRoutingTable
CompletionStage<RoutingTableHandler> ensureRoutingTable(SecurityPlan securityPlan, CompletableFuture<DatabaseName> databaseNameFuture, AccessMode mode, Set<String> rediscoveryBookmarks, String impersonatedUser, Supplier<CompletionStage<Map<String, Value>>> authMapStageSupplier, BoltProtocolVersion minVersion) Ensures the routing table for the database with given access mode. For server version lower than 4.0, the database name will be ignored while refreshing routing table.- Returns:
- The future of a new routing table handler.
-
allServers
Set<BoltServerAddress> allServers()- Returns:
- all servers in the registry
-
remove
Removes a routing table of the given database from registry. -
removeAged
void removeAged()Removes all routing tables that has been not used for a long time. -
getRoutingTableHandler
Returns routing table handler for the given database name if it exists in the registry.- Parameters:
databaseName- the database name- Returns:
- the routing table handler for the requested database name
-