public abstract class AbstractMastersSlavesListener extends AbstractMastersListener
Modifier and Type | Field and Description |
---|---|
protected AtomicReference<Protocol> |
waitNewMasterProtocol |
protected AtomicReference<Protocol> |
waitNewSecondaryProtocol |
currentConnectionAttempts, currentProtocol, currentReadOnlyAsked, explicitClosed, globalInfo, lastQueryNanos, lastRetry, proxy, urlParser
Modifier | Constructor and Description |
---|---|
protected |
AbstractMastersSlavesListener(UrlParser urlParser,
GlobalStateInfo globalInfo) |
Modifier and Type | Method and Description |
---|---|
abstract void |
foundActiveSecondary(Protocol newSecondaryProtocol) |
SearchFilter |
getFilterForFailedHost() |
long |
getSecondaryHostFailNanos() |
HandleErrorResult |
handleFailover(SQLException qe,
Method method,
Object[] args,
Protocol protocol,
boolean isClosed)
Handle failover on master or slave connection.
|
boolean |
hasHostFail() |
boolean |
isMasterHostFailReconnect() |
boolean |
isSecondaryHostFail() |
boolean |
isSecondaryHostFailReconnect() |
protected void |
resetMasterFailoverData() |
protected void |
resetSecondaryFailoverData() |
abstract HandleErrorResult |
secondaryFail(Method method,
Object[] args,
boolean killCmd) |
boolean |
setSecondaryHostFail()
Set slave connection lost variables.
|
abortConnection, addToBlacklist, canRetryFailLoop, checkMasterStatus, clearBlacklist, closeConnection, getBlacklistKeys, getCatalog, getCurrentProtocol, getLastQueryNanos, getMajorServerVersion, getMasterHostFailNanos, getProxy, getRetriesAllDown, getTimeout, getUrlParser, handleFailLoop, initializeConnection, inTransaction, invoke, invoke, isAutoReconnect, isClosed, isExplicitClosed, isMasterConnection, isMasterHostFail, isQueryRelaunchable, isReadOnly, isServerMariaDb, isValid, noBackslashEscapes, pingMasterProtocol, preAutoReconnect, preClose, preExecute, primaryFail, prolog, reconnect, reconnectFailedConnection, relaunchOperation, removeFromBlacklist, removeListenerFromSchedulers, resetOldsBlackListHosts, sessionStateAware, setMasterHostFail, setProxy, setSessionReadOnly, switchReadOnlyConnection, syncConnection, throwFailoverMessage, versionGreaterOrEqual
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
foundActiveMaster, getServerThreadId, isMasterConnected, preAbort, rePrepareOnSlave, reset
protected final AtomicReference<Protocol> waitNewSecondaryProtocol
protected final AtomicReference<Protocol> waitNewMasterProtocol
protected AbstractMastersSlavesListener(UrlParser urlParser, GlobalStateInfo globalInfo)
public HandleErrorResult handleFailover(SQLException qe, Method method, Object[] args, Protocol protocol, boolean isClosed) throws SQLException
handleFailover
in interface Listener
handleFailover
in class AbstractMastersListener
method
- called methodargs
- methods parametersprotocol
- current protocolSQLException
- if primary fail reconnection failsprotected void resetMasterFailoverData()
resetMasterFailoverData
in class AbstractMastersListener
protected void resetSecondaryFailoverData()
public long getSecondaryHostFailNanos()
public boolean setSecondaryHostFail()
public boolean isSecondaryHostFail()
public boolean isSecondaryHostFailReconnect()
public boolean isMasterHostFailReconnect()
public boolean hasHostFail()
hasHostFail
in interface Listener
hasHostFail
in class AbstractMastersListener
public SearchFilter getFilterForFailedHost()
getFilterForFailedHost
in interface Listener
getFilterForFailedHost
in class AbstractMastersListener
public abstract HandleErrorResult secondaryFail(Method method, Object[] args, boolean killCmd) throws SQLException
SQLException
public abstract void foundActiveSecondary(Protocol newSecondaryProtocol) throws SQLException
SQLException
Copyright © 2019 mariadb.org. All rights reserved.