public class AuroraProtocol extends MastersSlavesProtocol
masterConnectionreadScheduleractiveStreamingResult, autoIncrementIncrement, connected, database, eofDeprecated, explicitClosed, hasWarnings, lock, options, proxy, reader, readOnly, serverCapabilities, serverPrepareStatementCache, serverStatus, serverThreadId, socket, urlParser, writer| Constructor and Description |
|---|
AuroraProtocol(UrlParser url,
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,
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,
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, inTransaction, isInterrupted, ping, prepare, prolog, prologProxy, releasePrepareStatement, resetStateAfterFailover, rollback, setActiveFutureTask, setCatalog, setInternalMaxRows, setLocalInfileInputStream, setMaxRows, setTimeout, setTransactionIsolation, stopIfInterruptedchangeSocketSoTimeout, changeSocketTcpNoDelay, close, connect, connectWithoutProxy, getActiveStreamingResult, getDatabase, getDataTypeMappingFlags, getHost, getHostAddress, getLock, getMajorServerVersion, getMinorServerVersion, getOptions, getPinGlobalTxToPhysicalConnection, getPort, getProxy, getReader, getReadonly, getServerThreadId, getServerVersion, 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, waitchangeSocketSoTimeout, changeSocketTcpNoDelay, close, connect, connectWithoutProxy, getActiveStreamingResult, getDatabase, getDataTypeMappingFlags, getHost, getHostAddress, getLock, getMajorServerVersion, getMinorServerVersion, getOptions, getPinGlobalTxToPhysicalConnection, getPort, getProxy, getReader, getReadonly, getServerThreadId, getServerVersion, 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, ReentrantLock lock)
public static void loop(AuroraListener listener, List<HostAddress> addresses, SearchFilter initialSearchFilter) throws SQLException
listener - current failoveraddresses - list of HostAddress to loopinitialSearchFilter - search parameterSQLException - if not foundpublic static AuroraProtocol getNewProtocol(FailoverProxy proxy, UrlParser urlParser)
proxy - proxyurlParser - 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 © 2017. All rights reserved.