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)
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.
|
addToBlacklist, canRetryFailLoop, checkMasterStatus, clearBlacklist, closeConnection, getBlacklistKeys, getCurrentProtocol, getLastQueryNanos, getMasterHostFailNanos, getProxy, getRetriesAllDown, getUrlParser, handleFailLoop, initializeConnection, invoke, invoke, isAutoReconnect, isClosed, isExplicitClosed, isMasterHostFail, isQueryRelaunchable, isReadOnly, pingMasterProtocol, preAutoReconnect, preClose, preExecute, primaryFail, reconnect, reconnectFailedConnection, relaunchOperation, removeFromBlacklist, removeListenerFromSchedulers, resetOldsBlackListHosts, setMasterHostFail, setProxy, setSessionReadOnly, switchReadOnlyConnection, syncConnection, throwFailoverMessageclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfoundActiveMaster, isMasterConnected, 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) throws Throwable
handleFailover in interface ListenerhandleFailover in class AbstractMastersListenermethod - called methodargs - methods parametersprotocol - current protocolThrowable - if method with parameters doesn't existprotected void resetMasterFailoverData()
resetMasterFailoverData in class AbstractMastersListenerprotected void resetSecondaryFailoverData()
public long getSecondaryHostFailNanos()
public boolean setSecondaryHostFail()
public boolean isSecondaryHostFail()
public boolean isSecondaryHostFailReconnect()
public boolean isMasterHostFailReconnect()
public boolean hasHostFail()
hasHostFail in interface ListenerhasHostFail in class AbstractMastersListenerpublic SearchFilter getFilterForFailedHost()
getFilterForFailedHost in interface ListenergetFilterForFailedHost in class AbstractMastersListenerpublic abstract HandleErrorResult secondaryFail(Method method, Object[] args, boolean killCmd) throws Throwable
Throwablepublic abstract void foundActiveSecondary(Protocol newSecondaryProtocol) throws SQLException
SQLExceptionCopyright © 2017. All rights reserved.