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 Details

    • ensureRoutingTable

      CompletionStage<RoutingTableHandler> ensureRoutingTable(SecurityPlan securityPlan, CompletableFuture<DatabaseName> databaseNameFuture, AccessMode mode, Set<String> rediscoveryBookmarks, String impersonatedUser, Supplier<CompletionStage<AuthToken>> authTokenStageSupplier, BoltProtocolVersion minVersion, String homeDatabaseHint)
      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

      void remove(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(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