public interface ReaderFailoverHandler
| Modifier and Type | Method and Description |
|---|---|
ReaderFailoverResult |
failover(java.util.List<HostSpec> hosts,
HostSpec currentHost)
Called to start Reader Failover Process.
|
ReaderFailoverResult |
getReaderConnection(java.util.List<HostSpec> hostList)
Called to get any available reader connection.
|
ReaderFailoverResult failover(java.util.List<HostSpec> hosts, HostSpec currentHost) throws java.sql.SQLException
hosts - Cluster current topology.currentHost - The currently connected host that has failed.ReaderFailoverResult The results of this process.java.sql.SQLException - indicating whether the failover attempt was successful.ReaderFailoverResult getReaderConnection(java.util.List<HostSpec> hostList) throws java.sql.SQLException
hostList - Cluster current topology.ReaderFailoverResult The results of this process.java.sql.SQLException - if any error occurred while attempting a reader connection.