- 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 TypeMethodDescriptionSet<org.neo4j.driver.internal.BoltServerAddress>
ensureRoutingTable
(ConnectionContext context) Ensures the routing table for the database with given access mode.getRoutingTableHandler
(org.neo4j.driver.internal.DatabaseName databaseName) Returns routing table handler for the given database name if it exists in the registry.void
remove
(org.neo4j.driver.internal.DatabaseName databaseName) Removes a routing table of the given database from registry.void
Removes all routing tables that has been not used for a long time.
-
Method Details
-
ensureRoutingTable
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<org.neo4j.driver.internal.BoltServerAddress> allServers()- Returns:
- all servers in the registry
-
remove
void remove(org.neo4j.driver.internal.DatabaseName databaseName) 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
Optional<RoutingTableHandler> getRoutingTableHandler(org.neo4j.driver.internal.DatabaseName databaseName) 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
-