Interface ServerAddressResolver

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ServerAddressResolver
A resolver function used by the routing driver to resolve the initial address used to create the driver.
  • Method Summary

    Modifier and Type
    Method
    Description
    Resolve the given address to a set of other addresses.
  • Method Details

    • resolve

      Set<ServerAddress> resolve(ServerAddress address)
      Resolve the given address to a set of other addresses. It is highly recommended to shuffle the addresses returned to prevent the driver from always retrying servers in a specific order. Considering returning a LinkedHashSet to reserve the iteration order of a set. Exceptions thrown by this method will be logged and driver will continue using the original address.
      Parameters:
      address - the address to resolve.
      Returns:
      new set of addresses.