org.mariadb.jdbc.internal.failover
Interface Listener
- All Known Implementing Classes:
- AbstractMastersListener, AbstractMastersSlavesListener, AuroraListener, MastersFailoverListener, MastersSlavesListener
public interface Listener
|
Method Summary |
void |
addToBlacklist(HostAddress hostAddress)
|
boolean |
canRetryFailLoop()
|
boolean |
checkMasterStatus(SearchFilter searchFilter)
|
void |
foundActiveMaster(Protocol protocol)
|
Set<HostAddress> |
getBlacklistKeys()
|
Protocol |
getCurrentProtocol()
|
SearchFilter |
getFilterForFailedHost()
|
long |
getLastQueryNanos()
|
FailoverProxy |
getProxy()
|
int |
getRetriesAllDown()
|
UrlParser |
getUrlParser()
|
HandleErrorResult |
handleFailover(SQLException qe,
Method method,
Object[] args,
Protocol protocol)
|
boolean |
hasHostFail()
|
void |
initializeConnection()
|
Object |
invoke(Method method,
Object[] args)
|
Object |
invoke(Method method,
Object[] args,
Protocol specificProtocol)
|
boolean |
isAutoReconnect()
|
boolean |
isClosed()
|
boolean |
isExplicitClosed()
|
boolean |
isMasterConnected()
|
boolean |
isMasterHostFail()
|
boolean |
isReadOnly()
|
void |
preClose()
|
void |
preExecute()
|
HandleErrorResult |
primaryFail(Method method,
Object[] args)
|
void |
reconnect()
|
void |
reconnectFailedConnection(SearchFilter filter)
|
void |
removeFromBlacklist(HostAddress hostAddress)
|
void |
rePrepareOnSlave(ServerPrepareResult oldServerPrepareResult,
boolean mustExecuteOnMaster)
|
boolean |
setMasterHostFail()
|
void |
setProxy(FailoverProxy proxy)
|
void |
switchReadOnlyConnection(Boolean readonly)
|
void |
syncConnection(Protocol from,
Protocol to)
|
void |
throwFailoverMessage(HostAddress failHostAddress,
boolean wasMaster,
SQLException queryException,
boolean reconnected)
|
getProxy
FailoverProxy getProxy()
setProxy
void setProxy(FailoverProxy proxy)
initializeConnection
void initializeConnection()
throws SQLException
- Throws:
SQLException
preExecute
void preExecute()
throws SQLException
- Throws:
SQLException
preClose
void preClose()
throws SQLException
- Throws:
SQLException
reconnectFailedConnection
void reconnectFailedConnection(SearchFilter filter)
throws SQLException
- Throws:
SQLException
switchReadOnlyConnection
void switchReadOnlyConnection(Boolean readonly)
throws SQLException
- Throws:
SQLException
primaryFail
HandleErrorResult primaryFail(Method method,
Object[] args)
throws Throwable
- Throws:
Throwable
invoke
Object invoke(Method method,
Object[] args,
Protocol specificProtocol)
throws Throwable
- Throws:
Throwable
invoke
Object invoke(Method method,
Object[] args)
throws Throwable
- Throws:
Throwable
handleFailover
HandleErrorResult handleFailover(SQLException qe,
Method method,
Object[] args,
Protocol protocol)
throws Throwable
- Throws:
Throwable
foundActiveMaster
void foundActiveMaster(Protocol protocol)
throws SQLException
- Throws:
SQLException
getBlacklistKeys
Set<HostAddress> getBlacklistKeys()
addToBlacklist
void addToBlacklist(HostAddress hostAddress)
removeFromBlacklist
void removeFromBlacklist(HostAddress hostAddress)
syncConnection
void syncConnection(Protocol from,
Protocol to)
throws SQLException
- Throws:
SQLException
getUrlParser
UrlParser getUrlParser()
throwFailoverMessage
void throwFailoverMessage(HostAddress failHostAddress,
boolean wasMaster,
SQLException queryException,
boolean reconnected)
throws SQLException
- Throws:
SQLException
isAutoReconnect
boolean isAutoReconnect()
getRetriesAllDown
int getRetriesAllDown()
isExplicitClosed
boolean isExplicitClosed()
reconnect
void reconnect()
throws SQLException
- Throws:
SQLException
isReadOnly
boolean isReadOnly()
isClosed
boolean isClosed()
getCurrentProtocol
Protocol getCurrentProtocol()
hasHostFail
boolean hasHostFail()
canRetryFailLoop
boolean canRetryFailLoop()
getFilterForFailedHost
SearchFilter getFilterForFailedHost()
isMasterConnected
boolean isMasterConnected()
setMasterHostFail
boolean setMasterHostFail()
isMasterHostFail
boolean isMasterHostFail()
getLastQueryNanos
long getLastQueryNanos()
checkMasterStatus
boolean checkMasterStatus(SearchFilter searchFilter)
rePrepareOnSlave
void rePrepareOnSlave(ServerPrepareResult oldServerPrepareResult,
boolean mustExecuteOnMaster)
throws SQLException
- Throws:
SQLException
Copyright © 2017. All rights reserved.