java.lang.Object
org.neo4j.driver.internal.cluster.RoutingTableRegistryImpl
- All Implemented Interfaces:
RoutingTableRegistry
-
Constructor Summary
ConstructorsConstructorDescriptionRoutingTableRegistryImpl(ConnectionPool connectionPool, Rediscovery rediscovery, Clock clock, Logging logging, long routingTablePurgeDelayMs) -
Method Summary
Modifier and TypeMethodDescriptionSet<org.neo4j.driver.internal.BoltServerAddress>booleancontains(org.neo4j.driver.internal.DatabaseName databaseName) 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.voidremove(org.neo4j.driver.internal.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(ConnectionPool connectionPool, Rediscovery rediscovery, Clock clock, Logging logging, long routingTablePurgeDelayMs)
-
-
Method Details
-
ensureRoutingTable
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
public void remove(org.neo4j.driver.internal.DatabaseName databaseName) 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
public Optional<RoutingTableHandler> getRoutingTableHandler(org.neo4j.driver.internal.DatabaseName databaseName) 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
public boolean contains(org.neo4j.driver.internal.DatabaseName databaseName)
-