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
  • Enum Constant Details

  • Method Details

    • values

      public static RingMemberHostMapper[] 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

      public static RingMemberHostMapper valueOf(String name)
      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 name
      NullPointerException - 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 each Node.
      Specified by:
      mapHosts in interface HostMapper<RingMember>
      Parameters:
      hosts - the Iterable of Nodes to map, must not be null.
      Returns:
      the result objects for the given hosts.
      Throws:
      com.datastax.oss.driver.api.core.DriverException - if a DriverException is encountered mapping values (that is, there's no need to catch DriverException).