public class AuroraListener extends MastersSlavesListener
MastersSlavesListener.PingLoop
AbstractMastersListener.FailLoop
lastQueryTime, masterProtocol, scheduledPing, secondaryProtocol
queriesSinceFailover
blacklist, currentConnectionAttempts, currentProtocol, currentReadOnlyAsked, executorService, explicitClosed, isLooping, lastRetry, proxy, scheduledFailover, urlParser
Constructor and Description |
---|
AuroraListener(UrlParser urlParser)
Constructor for Aurora.
|
Modifier and Type | Method and Description |
---|---|
void |
checkMasterStatus(SearchFilter searchFilter)
Check master status.
|
void |
initializeConnection()
Initialize connections.
|
void |
reconnectFailedConnection(SearchFilter searchFilter)
search a valid connection for failed one.
|
HostAddress |
searchByStartName(Protocol secondaryProtocol,
List<HostAddress> loopAddress)
Aurora replica doesn't have the master endpoint but the master instance name.
|
checkInitialConnection, foundActiveMaster, foundActiveSecondary, preClose, preExecute, primaryFail, reconnect, secondaryFail, shouldReconnect, switchReadOnlyConnection, throwFailoverMessage
getFilterForFailedHost, getSecondaryHostFailTimestamp, handleFailover, hasHostFail, isSecondaryHostFail, resetMasterFailoverData, resetSecondaryFailoverData, setSecondaryHostFail
addToBlacklist, getBlacklist, getCurrentProtocol, getMasterHostFailTimestamp, getProxy, getRetriesAllDown, getUrlParser, invoke, isAutoReconnect, isClosed, isExplicitClosed, isMasterHostFail, isReadOnly, launchFailLoopIfNotlaunched, relaunchOperation, resetOldsBlackListHosts, setExplicitClosed, setMasterHostFail, setProxy, setSessionReadOnly, stopFailover, syncConnection
public AuroraListener(UrlParser urlParser)
urlParser
- connection informationspublic void initializeConnection() throws QueryException
MastersSlavesListener
initializeConnection
in interface Listener
initializeConnection
in class MastersSlavesListener
QueryException
- if a connection error append.public void reconnectFailedConnection(SearchFilter searchFilter) throws QueryException
reconnectFailedConnection
in interface Listener
reconnectFailedConnection
in class MastersSlavesListener
QueryException
- if a connection asked is not foundpublic HostAddress searchByStartName(Protocol secondaryProtocol, List<HostAddress> loopAddress)
secondaryProtocol
- the current secondary protocolloopAddress
- list of possible hostspublic void checkMasterStatus(SearchFilter searchFilter) throws QueryException
MastersSlavesListener
checkMasterStatus
in class MastersSlavesListener
searchFilter
- search filterQueryException
- exceptionCopyright © 2015. All rights reserved.