Class SeedNode


  • public class SeedNode
    extends Object
    The SeedNode represents a combination of hostname/ip and port that is used during the SDK bootstrap.

    Note that this class is used mostly internally but can be used during bootstrap to override the default ports on a per-node basis. Most of the time you want to use the connection string bootstrap instead.

    • Field Detail

      • LOCALHOST

        public static final Set<SeedNode> LOCALHOST
        Seed node pointing to localhost with default ports.
    • Method Detail

      • create

        public static SeedNode create​(String address)
        Creates a seed node from a hostname and the default ports.
        Parameters:
        address - the hostname or IP of the seed node.
        Returns:
        the created SeedNode.
      • create

        public static SeedNode create​(String address,
                                      Optional<Integer> kvPort,
                                      Optional<Integer> clusterManagerPort)
        Creates a seed node from a hostname and custom ports.
        Parameters:
        address - the hostname or IP of the seed node.
        Returns:
        the created SeedNode.
      • address

        public String address()
        The ip address or hostname of this seed node.
      • clusterManagerPort

        public Optional<Integer> clusterManagerPort()
        If present, the cluster manager port.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object