Interface Listener
-
- All Known Implementing Classes:
AbstractMastersListener
,AbstractMastersReplicasListener
,AuroraListener
,MastersFailoverListener
,MastersReplicasListener
public interface Listener
-
-
Method Summary
-
-
-
Method Detail
-
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()
-
preAbort
void preAbort()
-
getServerThreadId
long getServerThreadId()
-
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, boolean killCmd, boolean wasClosed) throws SQLException
- Throws:
SQLException
-
invoke
Object invoke(Method method, Object[] args, Protocol specificProtocol) throws Throwable
- Throws:
Throwable
-
handleFailover
HandleErrorResult handleFailover(SQLException qe, Method method, Object[] args, Protocol protocol, boolean wasClosed) 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()
-
inTransaction
boolean inTransaction()
-
getMajorServerVersion
int getMajorServerVersion()
-
isMasterConnection
boolean isMasterConnection()
-
isClosed
boolean isClosed()
-
versionGreaterOrEqual
boolean versionGreaterOrEqual(int major, int minor, int patch)
-
isServerMariaDb
boolean isServerMariaDb()
-
sessionStateAware
boolean sessionStateAware()
-
noBackslashEscapes
boolean noBackslashEscapes()
-
isValid
boolean isValid(int timeout) throws SQLException
- Throws:
SQLException
-
prolog
void prolog(long maxRows, MariaDbConnection connection, MariaDbStatement statement) throws SQLException
- Throws:
SQLException
-
getCatalog
String getCatalog() throws SQLException
- Throws:
SQLException
-
getTimeout
int getTimeout() throws SocketException
- Throws:
SocketException
-
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)
-
rePrepareOnReplica
void rePrepareOnReplica(ServerPrepareResult oldServerPrepareResult, boolean mustExecuteOnMaster) throws SQLException
- Throws:
SQLException
-
reset
void reset() throws SQLException
- Throws:
SQLException
-
-