public class AuroraProtocol extends MastersSlavesProtocol
activeStreamingResult, connected, currentHost, database, dataTypeMappingFlags, explicitClosed, hasWarnings, lock, moreResults, moreResultsTypeBinary, options, packetFetcher, prepareStatementCache, proxy, readOnly, 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)
Initilize new protocol instance.
|
boolean |
isMasterConnection() |
static void |
loop(AuroraListener listener,
List<HostAddress> addresses,
SearchFilter searchFilter)
loop until found the failed connection.
|
static void |
searchProbableMaster(AuroraListener listener,
HostAddress probableMaster,
SearchFilter searchFilter)
Connect aurora probable master.
|
foundMaster, foundSecondary, loop, mustBeMasterConnection, setMustBeMasterConnectionloopcancelCurrentQuery, closeExplicit, executePreparedQuery, executePreparedQueryAfterFailover, executeQueries, executeQueries, executeQueriesRewrite, executeQuery, executeQuery, fetchActiveStreamingResult, forceReleasePrepareStatement, getAutocommit, getMaxRows, getMoreResults, getResult, getTimeout, getTransactionIsolationLevel, hasMoreResults, hexdump, inTransaction, ping, prepare, prepare, prepareStatementCache, prolog, prologProxy, releasePrepareStatement, rollback, setCatalog, setInternalMaxRows, setLocalInfileInputStream, setMaxRows, setTimeout, setTransactionIsolationclose, close, connect, connectWithoutProxy, getActiveStreamingResult, getCalendar, getDatabase, getDataTypeMappingFlags, getHost, getHostAddress, getLock, getMajorServerVersion, getMinorServerVersion, getOptions, getPassword, getPinGlobalTxToPhysicalConnection, getPort, getPrepareStatementCache, getProxy, getReadonly, getServerData, getServerThreadId, getServerVersion, getUrlParser, getUsername, hasWarnings, isClosed, isConnected, isExplicitClosed, noBackslashEscapes, readEofPacket, setActiveStreamingResult, setHasWarnings, setHostAddress, setHostFailedWithoutProxy, setMoreResults, setProxy, setReadonly, shouldReconnectWithoutProxy, skip, versionGreaterOrEqualclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, connect, connectWithoutProxy, getActiveStreamingResult, getCalendar, getDatabase, getDataTypeMappingFlags, getHost, getHostAddress, getLock, getMajorServerVersion, getMinorServerVersion, getOptions, getPassword, getPinGlobalTxToPhysicalConnection, getPort, getProxy, getReadonly, getServerData, getServerThreadId, getServerVersion, getUrlParser, getUsername, hasWarnings, isClosed, isConnected, isExplicitClosed, noBackslashEscapes, setActiveStreamingResult, setHasWarnings, setHostAddress, setHostFailedWithoutProxy, setMoreResults, setProxy, setReadonly, shouldReconnectWithoutProxy, skip, versionGreaterOrEqualpublic AuroraProtocol(UrlParser url, ReentrantLock lock)
public static void searchProbableMaster(AuroraListener listener, HostAddress probableMaster, SearchFilter searchFilter) throws QueryException
listener - aurora failover to call back if master is foundprobableMaster - probable master hostsearchFilter - search filterQueryException - exceptionpublic static void loop(AuroraListener listener, List<HostAddress> addresses, SearchFilter searchFilter) throws QueryException
listener - current failoveraddresses - list of HostAddress to loopsearchFilter - search parameterQueryException - if not foundpublic static AuroraProtocol getNewProtocol(FailoverProxy proxy, UrlParser urlParser)
proxy - proxyurlParser - connection string data'spublic boolean isMasterConnection()
isMasterConnection in interface ProtocolisMasterConnection in class AbstractConnectProtocolpublic boolean checkIfMaster()
throws QueryException
checkIfMaster in interface ProtocolcheckIfMaster in class AbstractConnectProtocolQueryExceptionCopyright © 2016. All rights reserved.