public class AuroraProtocol extends MastersSlavesProtocol
masterConnectionreadScheduleractiveStreamingResult, autoIncrementIncrement, connected, database, eofDeprecated, explicitClosed, hasWarnings, lock, options, proxy, reader, readOnly, serverCapabilities, serverPrepareStatementCache, serverStatus, serverThreadId, socket, socketTimeout, urlParser, writer| Constructor and Description |
|---|
AuroraProtocol(UrlParser url,
GlobalStateInfo globalInfo,
ReentrantLock lock) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkIfMaster()
Aurora best way to check if a node is a master : is not in read-only mode.
|
static AuroraProtocol |
getNewProtocol(FailoverProxy proxy,
GlobalStateInfo globalInfo,
UrlParser urlParser)
Initialize new protocol instance.
|
boolean |
isMasterConnection()
Indicate if current protocol is a master protocol.
|
boolean |
isValid(int timeout)
Check that connection is valid. !!
|
static void |
loop(AuroraListener listener,
GlobalStateInfo globalInfo,
List<HostAddress> addresses,
SearchFilter initialSearchFilter)
loop until found the failed connection.
|
void |
readPipelineCheckMaster() |
foundMaster, foundSecondary, loop, mustBeMasterConnection, setMustBeMasterConnectionloopaddPrepareInCache, cancelCurrentQuery, closeExplicit, executeBatchClient, executeBatchServer, executeBatchStmt, executePreparedQuery, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, forceReleasePrepareStatement, forceReleaseWaitingPrepareStatement, getAutocommit, getAutoIncrementIncrement, getCatalog, getMaxRows, getResult, getTimeout, getTransactionIsolationLevel, handleIoException, interrupt, inTransaction, isInterrupted, ping, prepare, prolog, prologProxy, releasePrepareStatement, reset, resetDatabase, resetStateAfterFailover, rollback, setActiveFutureTask, setCatalog, setLocalInfileInputStream, setMaxRows, setTimeout, setTransactionIsolation, stopIfInterruptedabort, changeSocketSoTimeout, changeSocketTcpNoDelay, close, connect, connectWithoutProxy, getActiveStreamingResult, getDatabase, getHost, getHostAddress, getLock, getMajorServerVersion, getMinorServerVersion, getOptions, getPinGlobalTxToPhysicalConnection, getPort, getProxy, getReader, getReadonly, getServerThreadId, getServerVersion, getSocket, getTimeZone, getTraces, getUrlParser, getUsername, getWriter, hasMoreResults, hasWarnings, isClosed, isConnected, isEofDeprecated, isExplicitClosed, isServerMariaDb, noBackslashEscapes, prepareStatementCache, readEofPacket, removeActiveStreamingResult, removeHasMoreResults, sessionStateAware, setActiveStreamingResult, setHasWarnings, setHostAddress, setHostFailedWithoutProxy, setProxy, setReadonly, setServerStatus, shouldReconnectWithoutProxy, skip, skipEofPacket, versionGreaterOrEqualclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitabort, changeSocketSoTimeout, changeSocketTcpNoDelay, close, connect, connectWithoutProxy, getActiveStreamingResult, getDatabase, getHost, getHostAddress, getLock, getMajorServerVersion, getMinorServerVersion, getOptions, getPinGlobalTxToPhysicalConnection, getPort, getProxy, getReader, getReadonly, getServerThreadId, getServerVersion, getSocket, getTimeZone, getTraces, getUrlParser, getUsername, getWriter, hasMoreResults, hasWarnings, isClosed, isConnected, isEofDeprecated, isExplicitClosed, isServerMariaDb, noBackslashEscapes, prepareStatementCache, readEofPacket, removeActiveStreamingResult, removeHasMoreResults, sessionStateAware, setActiveStreamingResult, setHasWarnings, setHostAddress, setHostFailedWithoutProxy, setProxy, setReadonly, setServerStatus, shouldReconnectWithoutProxy, skip, skipEofPacket, versionGreaterOrEqualpublic AuroraProtocol(UrlParser url, GlobalStateInfo globalInfo, ReentrantLock lock)
public static void loop(AuroraListener listener, GlobalStateInfo globalInfo, List<HostAddress> addresses, SearchFilter initialSearchFilter) throws SQLException
listener - current failoverglobalInfo - server global variables informationaddresses - list of HostAddress to loopinitialSearchFilter - search parameterSQLException - if not foundpublic static AuroraProtocol getNewProtocol(FailoverProxy proxy, GlobalStateInfo globalInfo, UrlParser urlParser)
proxy - proxyglobalInfo - server global variables informationurlParser - connection string data'spublic boolean isMasterConnection()
AbstractConnectProtocolisMasterConnection in interface ProtocolisMasterConnection in class AbstractConnectProtocolpublic void readPipelineCheckMaster()
throws SQLException
readPipelineCheckMaster in class AbstractConnectProtocolSQLExceptionpublic boolean isValid(int timeout)
throws SQLException
AbstractQueryProtocolisValid in interface ProtocolisValid in class AbstractQueryProtocoltimeout - timeout in millisecondsSQLException - if any error occurpublic boolean checkIfMaster()
throws SQLException
checkIfMaster in interface ProtocolcheckIfMaster in class AbstractConnectProtocolSQLException - if requesting infos for server fail.Copyright © 2019 mariadb.org. All rights reserved.