Interface HostMapper<T>
- All Known Implementing Classes:
RingMemberHostMapper
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
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.- Author:
- Matthew T. Adams, Mark Paluch
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionImplementations must implement this method to map eachNode.
-
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 eachNode.- Parameters:
hosts- theIterableofNodes to map, must not be null.- Returns:
- the result objects for the given hosts.
- Throws:
com.datastax.oss.driver.api.core.DriverException- if aDriverExceptionis encountered mapping values (that is, there's no need to catchDriverException).
-