@InterfaceAudience.Public
public interface HostProvider
Modifier and Type | Method and Description |
---|---|
java.net.InetSocketAddress |
next(long spinDelay)
The next host to try to connect to.
|
void |
onConnected()
Notify the HostProvider of a successful connection.
|
int |
size() |
boolean |
updateServerList(java.util.Collection<java.net.InetSocketAddress> serverAddresses,
java.net.InetSocketAddress currentHost)
Update the list of servers.
|
int size()
java.net.InetSocketAddress next(long spinDelay)
spinDelay
- Milliseconds to wait if all hosts have been tried once.void onConnected()
boolean updateServerList(java.util.Collection<java.net.InetSocketAddress> serverAddresses, java.net.InetSocketAddress currentHost)
serverAddresses
- new host listcurrentHost
- the host to which this client is currently connectedCopyright © 2018 The Apache Software Foundation