@FunctionalInterface public interface HostMapper<T>
CqlTemplate
for mapping Host
s of a 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.driver.core.Host> hosts)
Implementations must implement this method to map each
Host in the
Metadata . |
Collection<T> mapHosts(Iterable<com.datastax.driver.core.Host> hosts) throws com.datastax.driver.core.exceptions.DriverException
Host
in the
Metadata
.hosts
- the Iterable
of Host
s to map, must not be null.com.datastax.driver.core.exceptions.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.