@FunctionalInterface public interface HostMapper<T>
CqlTemplate
for mapping Node
s 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
.CqlTemplate
Modifier and Type | Method and Description |
---|---|
Collection<T> |
mapHosts(Iterable<com.datastax.oss.driver.api.core.metadata.Node> hosts)
Implementations must implement this method to map each
Node . |
Collection<T> mapHosts(Iterable<com.datastax.oss.driver.api.core.metadata.Node> hosts) throws com.datastax.oss.driver.api.core.DriverException
Node
.hosts
- the Iterable
of Node
s to map, must not be null.com.datastax.oss.driver.api.core.DriverException
- if a DriverException
is encountered mapping values (that is, there's no need to
catch DriverException
).Copyright © 2011–2020 Pivotal Software, Inc.. All rights reserved.