public class AuroraListener extends MastersSlavesListener
hostAddresses, masterProtocol, secondaryProtocol
waitNewMasterProtocol, waitNewSecondaryProtocol
currentConnectionAttempts, currentProtocol, currentReadOnlyAsked, explicitClosed, globalInfo, lastQueryNanos, lastRetry, proxy, urlParser
Constructor and Description |
---|
AuroraListener(UrlParser urlParser,
GlobalStateInfo globalInfo)
Constructor for Aurora.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkMasterStatus(SearchFilter searchFilter)
Check master status.
|
String |
getClusterDnsSuffix() |
HostAddress |
getClusterHostAddress() |
void |
reconnectFailedConnection(SearchFilter initialSearchFilter)
Search a valid connection for failed one.
|
void |
retrieveAllEndpointsAndSet(Protocol protocol)
Retrieves the information necessary to add a new endpoint.
|
HostAddress |
searchByStartName(Protocol secondaryProtocol,
List<HostAddress> loopAddress)
Looks for the current master/writer instance via the secondary protocol if it is found within 3
attempts.
|
checkInitialConnection, checkWaitingConnection, connectedHosts, foundActiveMaster, foundActiveSecondary, getCatalog, getMajorServerVersion, getServerThreadId, getTimeout, handleFailLoop, initializeConnection, inTransaction, invoke, isClosed, isMasterConnected, isMasterConnection, isServerMariaDb, isValid, lockAndSwitchMaster, lockAndSwitchSecondary, noBackslashEscapes, preAbort, preClose, preExecute, primaryFail, prolog, reconnect, removeListenerFromSchedulers, rePrepareOnSlave, reset, secondaryFail, sessionStateAware, switchReadOnlyConnection, versionGreaterOrEqual
getFilterForFailedHost, getSecondaryHostFailNanos, handleFailover, hasHostFail, isMasterHostFailReconnect, isSecondaryHostFail, isSecondaryHostFailReconnect, resetMasterFailoverData, resetSecondaryFailoverData, setSecondaryHostFail
abortConnection, addToBlacklist, canRetryFailLoop, clearBlacklist, closeConnection, getBlacklistKeys, getCurrentProtocol, getLastQueryNanos, getMasterHostFailNanos, getProxy, getRetriesAllDown, getUrlParser, invoke, isAutoReconnect, isExplicitClosed, isMasterHostFail, isQueryRelaunchable, isReadOnly, pingMasterProtocol, preAutoReconnect, relaunchOperation, removeFromBlacklist, resetOldsBlackListHosts, setMasterHostFail, setProxy, setSessionReadOnly, syncConnection, throwFailoverMessage
public AuroraListener(UrlParser urlParser, GlobalStateInfo globalInfo) throws SQLException
urlParser
- connection informationglobalInfo
- server global variables informationSQLException
- when connection string contain host with different clusterpublic String getClusterDnsSuffix()
public HostAddress getClusterHostAddress()
public void reconnectFailedConnection(SearchFilter initialSearchFilter) throws SQLException
reconnectFailedConnection
in interface Listener
reconnectFailedConnection
in class MastersSlavesListener
initialSearchFilter
- initial search filterSQLException
- if a connection asked is not foundpublic void retrieveAllEndpointsAndSet(Protocol protocol) throws SQLException
protocol
- current protocol connected toSQLException
- if connection error occurpublic HostAddress searchByStartName(Protocol secondaryProtocol, List<HostAddress> loopAddress)
secondaryProtocol
- the current secondary protocolloopAddress
- list of possible hostspublic boolean checkMasterStatus(SearchFilter searchFilter)
MastersSlavesListener
checkMasterStatus
in interface Listener
checkMasterStatus
in class MastersSlavesListener
searchFilter
- search filterCopyright © 2020 mariadb.com. All rights reserved.