public interface HostSelector
| Modifier and Type | Method and Description |
|---|---|
HostSpec |
getHost(java.util.List<HostSpec> hosts,
HostRole role)
Selects a host with the requested role from the given host list.
|
HostSpec getHost(java.util.List<HostSpec> hosts, HostRole role) throws java.sql.SQLException
hosts - a list of available hosts to pick fromrole - the desired host role - either a writer or a readerjava.sql.SQLException - if the host list does not contain any hosts matching the requested role or
an error occurs while selecting a host