primaryFail
public HandleErrorResult primaryFail(Method method,
Object[] args,
boolean killCmd,
boolean alreadyClosed)
- Specified by:
primaryFail
in interfaceListener
- Specified by:
primaryFail
in classAbstractMastersListener
Listener
currentConnectionAttempts, currentProtocol, currentReadOnlyAsked, explicitClosed, globalInfo, lastQueryNanos, lastRetry, proxy, urlParser
MastersFailoverListener(UrlParser urlParser,
GlobalStateInfo globalInfo)
boolean
checkMasterStatus(SearchFilter searchFilter)
void
foundActiveMaster(Protocol protocol)
long
void
void
boolean
void
preAbort()
void
preClose()
void
primaryFail(Method method,
Object[] args,
boolean killCmd,
boolean alreadyClosed)
void
void
reconnectFailedConnection(SearchFilter searchFilter)
void
rePrepareOnSlave(ServerPrepareResult oldServerPrepareResult,
boolean mustExecuteOnSlave)
void
reset()
void
switchReadOnlyConnection(Boolean mustBeReadOnly)
abortConnection, addToBlacklist, canRetryFailLoop, clearBlacklist, closeConnection, getBlacklistKeys, getCatalog, getCurrentProtocol, getFilterForFailedHost, getLastQueryNanos, getMajorServerVersion, getMasterHostFailNanos, getProxy, getRetriesAllDown, getTimeout, getUrlParser, handleFailover, hasHostFail, inTransaction, invoke, invoke, isAutoReconnect, isClosed, isExplicitClosed, isMasterConnection, isMasterHostFail, isQueryRelaunchable, isReadOnly, isServerMariaDb, isValid, noBackslashEscapes, pingMasterProtocol, preAutoReconnect, prolog, relaunchOperation, removeFromBlacklist, removeListenerFromSchedulers, resetMasterFailoverData, resetOldsBlackListHosts, sessionStateAware, setMasterHostFail, setProxy, setSessionReadOnly, syncConnection, throwFailoverMessage, versionGreaterOrEqual
urlParser
- url options.globalInfo
- server global variables informationinitializeConnection
in interface Listener
initializeConnection
in class AbstractMastersListener
SQLException
- if connection is on error.preExecute
in interface Listener
preExecute
in class AbstractMastersListener
SQLException
- if connection has been explicitly closed.preClose
in interface Listener
preClose
in class AbstractMastersListener
primaryFail
in interface Listener
primaryFail
in class AbstractMastersListener
reconnectFailedConnection
in interface Listener
reconnectFailedConnection
in class AbstractMastersListener
searchFilter
- search parameters.SQLException
- if there is any error during reconnectionswitchReadOnlyConnection
in interface Listener
switchReadOnlyConnection
in class AbstractMastersListener
mustBeReadOnly
- is read-only flagSQLException
- if a connection error occurprotocol
- the new active connectionSQLException
reconnect
in interface Listener
reconnect
in class AbstractMastersListener
SQLException
- if reconnect a new connection but there was an active transaction.handleFailLoop
in class AbstractMastersListener
checkMasterStatus
in interface Listener
checkMasterStatus
in class AbstractMastersListener
searchFilter
- search filterSQLException
- if command fail.