Interface HostMapper<T>

All Known Implementing Classes:
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 HostMapper<T>
An interface used by CqlTemplate for mapping Nodes of metadata on a per-item basis.. Implementations of this interface perform the actual work of mapping each host to a result object, but don't need to worry about exception handling. DriverException will be caught and handled by the calling CqlTemplate.
Matthew T. Adams, Mark Paluch
See Also:
  • Method Summary

    Modifier and Type
    mapHosts(Iterable<com.datastax.oss.driver.api.core.metadata.Node> hosts)
    Implementations must implement this method to map each Node.
  • Method Details

    • mapHosts

      Collection<T> mapHosts(Iterable<com.datastax.oss.driver.api.core.metadata.Node> hosts) throws com.datastax.oss.driver.api.core.DriverException
      Implementations must implement this method to map each Node.
      hosts - the Iterable of Nodes to map, must not be null.
      the result objects for the given hosts.
      com.datastax.oss.driver.api.core.DriverException - if a DriverException is encountered mapping values (that is, there's no need to catch DriverException).