Module org.neo4j.driver
Class RoutingTableRegistryImpl
java.lang.Object
org.neo4j.driver.internal.bolt.routedimpl.cluster.RoutingTableRegistryImpl
- All Implemented Interfaces:
RoutingTableRegistry
-
Constructor Summary
ConstructorsConstructorDescriptionRoutingTableRegistryImpl(Function<BoltServerAddress, BoltConnectionProvider> connectionProviderGetter, Rediscovery rediscovery, Clock clock, LoggingProvider logging, long routingTablePurgeDelayMs, Consumer<Set<BoltServerAddress>> addressesToRetainConsumer) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(DatabaseName databaseName) 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.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.
-
Constructor Details
-
RoutingTableRegistryImpl
public RoutingTableRegistryImpl(Function<BoltServerAddress, BoltConnectionProvider> connectionProviderGetter, Rediscovery rediscovery, Clock clock, LoggingProvider logging, long routingTablePurgeDelayMs, Consumer<Set<BoltServerAddress>> addressesToRetainConsumer)
-
-
Method Details
-
ensureRoutingTable
public CompletionStage<RoutingTableHandler> ensureRoutingTable(SecurityPlan securityPlan, CompletableFuture<DatabaseName> databaseNameFuture, AccessMode mode, Set<String> rediscoveryBookmarks, String impersonatedUser, Supplier<CompletionStage<Map<String, Value>>> authMapStageSupplier, BoltProtocolVersion minVersion) Description copied from interface:RoutingTableRegistryEnsures 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.- Specified by:
ensureRoutingTablein interfaceRoutingTableRegistry- Returns:
- The future of a new routing table handler.
-
allServers
- Specified by:
allServersin interfaceRoutingTableRegistry- Returns:
- all servers in the registry
-
remove
Description copied from interface:RoutingTableRegistryRemoves a routing table of the given database from registry.- Specified by:
removein interfaceRoutingTableRegistry
-
removeAged
public void removeAged()Description copied from interface:RoutingTableRegistryRemoves all routing tables that has been not used for a long time.- Specified by:
removeAgedin interfaceRoutingTableRegistry
-
getRoutingTableHandler
Description copied from interface:RoutingTableRegistryReturns routing table handler for the given database name if it exists in the registry.- Specified by:
getRoutingTableHandlerin interfaceRoutingTableRegistry- Parameters:
databaseName- the database name- Returns:
- the routing table handler for the requested database name
-
contains
-