public class AuroraProtocol extends MastersSlavesProtocol
| 限定符和类型 | 字段和说明 |
|---|---|
protected static Logger |
lockLogger |
masterConnectionactiveStreamingResult, autoCommit, autoIncrementIncrement, CHECK_GALERA_STATE_QUERY, connected, database, enableFullLinkTrace, eofDeprecated, exceptionFactory, explicitClosed, galeraAllowedStates, hasWarnings, lock, options, proxy, reader, readOnly, seed, serverCapabilities, serverPrepareStatementCache, serverStatus, serverThreadId, serverVersion, socket, socketTimeout, traceCache, transactionIsolationLevel, urlParser, useNewExtraInfo, useOceanBaseProtocolV20, username, writer| 构造器和说明 |
|---|
AuroraProtocol(UrlParser url,
GlobalStateInfo globalInfo,
ReentrantLock lock,
LruTraceCache traceCache) |
| 限定符和类型 | 方法和说明 |
|---|---|
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, setMustBeMasterConnectionloop, loopaddPrepareInCache, cancelCurrentQuery, changeUser, clearNetworkStatistics, closeExplicit, executeBatchClient, executeBatchServer, executeBatchStmt, executePreparedQuery, executePreparedQuery, executePreparedQueryArrayBinding, executePreparedQueryArrayBinding, executeQuery, executeQuery, executeQuery, executeQuery, executeQuery, fetchRowViaCursor, fetchRowViaCursorForOracle, forceReleasePrepareStatement, getAutocommit, getAutoIncrementIncrement, getCatalog, getChecksum, getExecuteMode, getIterationCount, getLastPacketCostTime, getLastPacketResponseTimestamp, getLastPacketSendTimestamp, getMaxRows, getNetworkStatisticsFlag, getResult, getResultWithoutValue, getTimeout, getTransactionIsolationLevel, handleIoException, interrupt, inTransaction, isInterrupted, ping, prepare, prolog, prologProxy, readErrorPacket, readOkPacket, readResultSet, releasePrepareStatement, reset, resetChecksum, resetDatabase, resetStateAfterFailover, rollback, setActiveFutureTask, setAutoCommit, setCatalog, setChecksum, setComStmtPrepareExecuteField, setExecuteMode, setIterationCount, setLocalInfileInputStream, setMaxRows, setNetworkStatisticsFlag, setReadonly, setTimeout, setTransactionIsolation, setUsername, stopIfInterruptedabort, changeSocketSoTimeout, changeSocketTcpNoDelay, cleanMemory, close, connect, connectWithoutProxy, destroySocket, endCallInterface, getActiveStreamingResult, getCurrentHost, getDatabase, getEncoding, getFullLinkTraceAction, getFullLinkTraceClientInfo, getFullLinkTraceIdentifier, getFullLinkTraceLevel, getFullLinkTraceModule, getFullLinkTracePrintSamplePercentage, getFullLinkTraceRecordPolicy, getFullLinkTraceSamplePercentage, getFullLinkTraceSlowQueryThreshold, getHost, getHostAddress, getLock, getMajorServerVersion, getMinorServerVersion, getObServerVersion, getOptions, getPinGlobalTxToPhysicalConnection, getPort, getProxy, getReader, getReadonly, getServerStatus, getServerThreadId, getServerTimeZone, getServerVersion, getSocket, getTimeTrace, getTimeZone, getTraces, getUrlParser, getUsername, getWriter, hasMoreResults, hasWarnings, haveInformationSchemaParameters, isClosed, isConnected, isEofDeprecated, isExplicitClosed, isOracleMode, isServerMariaDb, isTZTablesImported, noBackslashEscapes, parseVersion, postConnectionQueries, prepareStatementCache, readEofPacket, removeActiveStreamingResult, removeHasMoreResults, sessionStateAware, setActiveStreamingResult, setFullLinkTraceAction, setFullLinkTraceClientInfo, setFullLinkTraceIdentifier, setFullLinkTraceModule, setHasWarnings, setHostAddress, setHostFailedWithoutProxy, setObServerVersion, setOracleMode, setProxy, setServerStatus, shouldReconnectWithoutProxy, skip, skipEofPacket, startCallInterface, supportFetchWithOffset, supportStmtPrepareExecute, versionGreaterOrEqual, whyConnectedIsFalseclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitabort, changeSocketSoTimeout, changeSocketTcpNoDelay, close, connect, connectWithoutProxy, endCallInterface, getActiveStreamingResult, getCurrentHost, getDatabase, getEncoding, getFullLinkTraceAction, getFullLinkTraceClientInfo, getFullLinkTraceIdentifier, getFullLinkTraceLevel, getFullLinkTraceModule, getFullLinkTracePrintSamplePercentage, getFullLinkTraceRecordPolicy, getFullLinkTraceSamplePercentage, getFullLinkTraceSlowQueryThreshold, getHost, getHostAddress, getLock, getMajorServerVersion, getMinorServerVersion, getObServerVersion, getOptions, getPinGlobalTxToPhysicalConnection, getPort, getProxy, getReader, getReadonly, getServerStatus, getServerThreadId, getServerVersion, getSocket, getTimeTrace, getTimeZone, getTraces, getUrlParser, getUsername, getWriter, hasMoreResults, hasWarnings, haveInformationSchemaParameters, isClosed, isConnected, isEofDeprecated, isExplicitClosed, isOracleMode, isServerMariaDb, isTZTablesImported, noBackslashEscapes, parseVersion, prepareStatementCache, readEofPacket, removeActiveStreamingResult, removeHasMoreResults, sessionStateAware, setActiveStreamingResult, setFullLinkTraceAction, setFullLinkTraceClientInfo, setFullLinkTraceIdentifier, setFullLinkTraceModule, setHasWarnings, setHostAddress, setHostFailedWithoutProxy, setObServerVersion, setProxy, setServerStatus, shouldReconnectWithoutProxy, skip, skipEofPacket, startCallInterface, supportFetchWithOffset, supportStmtPrepareExecute, versionGreaterOrEqualprotected static final Logger lockLogger
public AuroraProtocol(UrlParser url, GlobalStateInfo globalInfo, ReentrantLock lock, LruTraceCache traceCache)
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 在接口中 ProtocolisMasterConnection 在类中 AbstractConnectProtocolpublic void readPipelineCheckMaster()
throws SQLException
public boolean isValid(int timeout)
throws SQLException
AbstractQueryProtocolisValid 在接口中 ProtocolisValid 在类中 AbstractQueryProtocoltimeout - timeout in millisecondsSQLException - if any error occurpublic boolean checkIfMaster()
throws SQLException
checkIfMaster 在接口中 ProtocolcheckIfMaster 在类中 AbstractConnectProtocolSQLException - if requesting infos for server fail.Copyright © 2024 oceanbase.com. All rights reserved.