public class LoadbalanceTarget extends Object
ClientTransport, representing a specific target for
loadbalancing purposes. The key is used to compare previous and new targets when refreshing the
list of target to use. The transport is used to connect to the target.| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
static LoadbalanceTarget |
from(String key,
ClientTransport transport)
Create a an instance of
LoadbalanceTarget with the given key and ClientTransport. |
String |
getKey()
Return the key for this target.
|
ClientTransport |
getTransport()
Return the transport to use to connect to the target.
|
int |
hashCode() |
public String getKey()
public ClientTransport getTransport()
public static LoadbalanceTarget from(String key, ClientTransport transport)
LoadbalanceTarget with the given key and ClientTransport. The key can be anything that can be used to identify identical targets, e.g.
a SocketAddress, URL, etc.key - the key to use to identify identical targetstransport - the transport to use for connecting to the target