public abstract class AbstractMastersSlavesListener extends AbstractMastersListener
| 限定符和类型 | 字段和说明 |
|---|---|
protected AtomicReference<Protocol> |
waitNewMasterProtocol |
protected AtomicReference<Protocol> |
waitNewSecondaryProtocol |
currentConnectionAttempts, currentProtocol, currentReadOnlyAsked, explicitClosed, globalInfo, lastQueryNanos, lastRetry, lockLogger, proxy, urlParser| 限定符 | 构造器和说明 |
|---|---|
protected |
AbstractMastersSlavesListener(UrlParser urlParser,
GlobalStateInfo globalInfo) |
| 限定符和类型 | 方法和说明 |
|---|---|
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() |
void |
resetMasterFailoverData() |
protected void |
resetSecondaryFailoverData() |
abstract HandleErrorResult |
secondaryFail(Method method,
Object[] args,
boolean killCmd) |
boolean |
setSecondaryHostFail()
Set slave connection lost variables.
|
abortConnection, addToBlacklist, addToPickedList, canRetryFailLoop, checkMasterStatus, clearBlacklist, closeConnection, getBlacklist, getBlacklistKeys, getCatalog, getCurrentLoadBalanceInfo, getCurrentProtocol, getLastQueryNanos, getMajorServerVersion, getMasterHostFailNanos, getPickedlist, getProxy, getRetriesAllDown, getRetryAllDowns, 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, removeFromPickedList, removeListenerFromSchedulers, resetHostStateInfo, resetOldsBlackListHosts, sessionStateAware, setCurrentLoadBalanceInfo, setMasterHostFail, setProxy, setRetryAllDowns, setSessionReadOnly, switchReadOnlyConnection, syncConnection, throwFailoverMessage, versionGreaterOrEqualclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfoundActiveMaster, getServerThreadId, isMasterConnected, preAbort, rePrepareOnSlave, resetprotected 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 在接口中 ListenerhandleFailover 在类中 AbstractMastersListenermethod - called methodargs - methods parametersprotocol - current protocolSQLException - if primary fail reconnection failspublic void resetMasterFailoverData()
protected void resetSecondaryFailoverData()
public long getSecondaryHostFailNanos()
public boolean setSecondaryHostFail()
public boolean isSecondaryHostFail()
public boolean isSecondaryHostFailReconnect()
public boolean isMasterHostFailReconnect()
public boolean hasHostFail()
hasHostFail 在接口中 ListenerhasHostFail 在类中 AbstractMastersListenerpublic SearchFilter getFilterForFailedHost()
getFilterForFailedHost 在接口中 ListenergetFilterForFailedHost 在类中 AbstractMastersListenerpublic abstract HandleErrorResult secondaryFail(Method method, Object[] args, boolean killCmd) throws SQLException
SQLExceptionpublic abstract void foundActiveSecondary(Protocol newSecondaryProtocol) throws SQLException
SQLExceptionCopyright © 2024 oceanbase.com. All rights reserved.