public final class ContactPoint extends Object
This class is used to parse JDBC URL and extract hosts and ports of the contact points.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getHost()
Gets the hostname of the contact point.
|
Integer |
getPort()
Gets the port of the contact point.
|
int |
hashCode() |
static ContactPoint |
of(String host,
Integer port)
Instantiates a contact point from the host and port.
|
InetSocketAddress |
toInetSocketAddress()
Converts the contact point into a socket address usable to instantiate a connection to a Cassandra cluster.
|
String |
toString() |
public static ContactPoint of(String host, Integer port)
host - The hostname.port - The port. If null, the default Cassandra port () is used.public String getHost()
public Integer getPort()
public InetSocketAddress toInetSocketAddress()
Copyright © 2020–2024 ING Bank. All rights reserved.