public abstract class AbstractMastersSlavesListener extends AbstractMastersListener
AbstractMastersListener.FailLoop| Modifier and Type | Field and Description |
|---|---|
protected AtomicInteger |
queriesSinceFailover |
blacklist, currentConnectionAttempts, currentProtocol, currentReadOnlyAsked, executorService, explicitClosed, isLooping, lastRetry, proxy, scheduledFailover, urlParser| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMastersSlavesListener(UrlParser urlParser) |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
foundActiveSecondary(Protocol newSecondaryProtocol) |
SearchFilter |
getFilterForFailedHost() |
long |
getSecondaryHostFailTimestamp() |
HandleErrorResult |
handleFailover(Method method,
Object[] args)
Handle failover on master or slave connection.
|
boolean |
hasHostFail() |
boolean |
isSecondaryHostFail() |
protected void |
resetMasterFailoverData() |
protected void |
resetSecondaryFailoverData() |
abstract HandleErrorResult |
secondaryFail(Method method,
Object[] args) |
boolean |
setSecondaryHostFail()
Set slave connection lost variables.
|
addToBlacklist, getBlacklist, getCurrentProtocol, getMasterHostFailTimestamp, getProxy, getRetriesAllDown, getUrlParser, initializeConnection, invoke, isAutoReconnect, isClosed, isExplicitClosed, isMasterHostFail, isReadOnly, launchFailLoopIfNotlaunched, preClose, preExecute, primaryFail, reconnect, reconnectFailedConnection, relaunchOperation, resetOldsBlackListHosts, setExplicitClosed, setMasterHostFail, setProxy, setSessionReadOnly, shouldReconnect, stopFailover, switchReadOnlyConnection, syncConnection, throwFailoverMessageclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfoundActiveMasterprotected AtomicInteger queriesSinceFailover
protected AbstractMastersSlavesListener(UrlParser urlParser)
public HandleErrorResult handleFailover(Method method, Object[] args) throws Throwable
handleFailover in interface ListenerhandleFailover in class AbstractMastersListenermethod - called methodargs - methods parametersThrowable - if method with parameters doesn't existprotected void resetMasterFailoverData()
resetMasterFailoverData in class AbstractMastersListenerprotected void resetSecondaryFailoverData()
public long getSecondaryHostFailTimestamp()
public boolean setSecondaryHostFail()
public boolean isSecondaryHostFail()
public boolean hasHostFail()
hasHostFail in class AbstractMastersListenerpublic SearchFilter getFilterForFailedHost()
getFilterForFailedHost in class AbstractMastersListenerpublic abstract HandleErrorResult secondaryFail(Method method, Object[] args) throws Throwable
Throwablepublic abstract void foundActiveSecondary(Protocol newSecondaryProtocol) throws QueryException
QueryExceptionCopyright © 2015. All rights reserved.