Enum Class RingMemberHostMapper
java.lang.Object
java.lang.Enum<RingMemberHostMapper>
org.springframework.data.cassandra.core.cql.RingMemberHostMapper
- All Implemented Interfaces:
Serializable
,Comparable<RingMemberHostMapper>
,Constable
,HostMapper<RingMember>
public enum RingMemberHostMapper
extends Enum<RingMemberHostMapper>
implements HostMapper<RingMember>
HostMapper
to to map hosts into RingMember
objects.- Author:
- David Webb, Mark Paluch
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionImplementations must implement this method to map eachNode
.static RingMemberHostMapper
Returns the enum constant of this class with the specified name.static RingMemberHostMapper[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
mapHosts
public Collection<RingMember> mapHosts(Iterable<com.datastax.oss.driver.api.core.metadata.Node> hosts) throws com.datastax.oss.driver.api.core.DriverException Description copied from interface:HostMapper
Implementations must implement this method to map eachNode
.- Specified by:
mapHosts
in interfaceHostMapper<RingMember>
- Parameters:
hosts
- theIterable
ofNode
s to map, must not be null.- Returns:
- the result objects for the given hosts.
- Throws:
com.datastax.oss.driver.api.core.DriverException
- if aDriverException
is encountered mapping values (that is, there's no need to catchDriverException
).
-