@InterfaceAudience.Public
public interface HostProvider
Modifier and Type | Method and Description |
---|---|
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(Collection<InetSocketAddress> serverAddresses,
InetSocketAddress currentHost)
Update the list of servers.
|
int size()
InetSocketAddress next(long spinDelay)
spinDelay
- Milliseconds to wait if all hosts have been tried once.void onConnected()
boolean updateServerList(Collection<InetSocketAddress> serverAddresses, InetSocketAddress currentHost)
serverAddresses
- new host listcurrentHost
- the host to which this client is currently connectedCopyright © 2008–2020 The Apache Software Foundation. All rights reserved.