org.mariadb.jdbc.internal.protocol

## Class AuroraProtocol

- java.lang.Object
- - org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol
  - - org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol
    - - org.mariadb.jdbc.internal.protocol.MasterProtocol
      - - org.mariadb.jdbc.internal.protocol.MastersSlavesProtocol
        - - org.mariadb.jdbc.internal.protocol.AuroraProtocol

All Implemented Interfaces:
  Protocol

    public class AuroraProtocol
    extends MastersSlavesProtocol

### Field Summary

### Fields inherited from class org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol

`activeStreamingResult, checkCallableResultSet, connected, currentHost, database, dataTypeMappingFlags, explicitClosed, hasWarnings, lock, moreResults, options, packetFetcher, proxy, readOnly, serverPrepareStatementCache, serverStatus, serverThreadId, socket, urlParser, writer`

### Constructor Summary

Constructors
Constructor and Description
`AuroraProtocol(UrlParser url, ReentrantLock lock)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`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.
`static void` `loop(AuroraListener listener, List<HostAddress> addresses, SearchFilter searchFilter)` loop until found the failed connection.
`static void` `searchProbableMaster(AuroraListener listener, HostAddress probableMaster)` Connect aurora probable master.

### Methods inherited from class org.mariadb.jdbc.internal.protocol.MastersSlavesProtocol

`foundMaster, foundSecondary, loop, mustBeMasterConnection, setMustBeMasterConnection`

### Methods inherited from class org.mariadb.jdbc.internal.protocol.MasterProtocol

`loop`

### Methods inherited from class org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol

`addPrepareInCache, cancelCurrentQuery, closeExplicit, executeBatch, executeBatchMulti, executeBatchMultiple, executeBatchRewrite, executePreparedQuery, executeQuery, executeQuery, executeQuery, forceReleasePrepareStatement, forceReleaseWaitingPrepareStatement, getAutocommit, getMaxRows, getResult, getTimeout, getTransactionIsolationLevel, hasMoreResults, inTransaction, ping, prepare, prepareAndExecute, prepareAndExecutes, prolog, prologProxy, readErrorPacket, readLocalInfilePacket, readOkPacket, readPacket, readResultSet, releasePrepareStatement, resetStateAfterFailover, rollback, setCatalog, setInternalMaxRows, setLocalInfileInputStream, setMaxRows, setTimeout, setTransactionIsolation`

### Methods inherited from class org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol

`changeSocketSoTimeout, changeSocketTcpNoDelay, close, close, connect, connectWithoutProxy, enabledSslCipherSuites, enabledSslProtocolSuites, getActiveStreamingResult, getCalendar, getDatabase, getDataTypeMappingFlags, getHost, getHostAddress, getLock, getMajorServerVersion, getMinorServerVersion, getOptions, getPacketFetcher, getPassword, getPinGlobalTxToPhysicalConnection, getPort, getProxy, getReadonly, getServerData, getServerThreadId, getServerVersion, getUrlParser, getUsername, getWriter, hasWarnings, isClosed, isConnected, isExplicitClosed, noBackslashEscapes, prepareStatementCache, readEofPacket, releaseWriterBuffer, removeActiveStreamingResult, setActiveStreamingResult, setHasWarnings, setHostAddress, setHostFailedWithoutProxy, setMoreResults, setProxy, setReadonly, shouldReconnectWithoutProxy, skip, skipEofPacket, versionGreaterOrEqual`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.mariadb.jdbc.internal.protocol.Protocol

`changeSocketSoTimeout, changeSocketTcpNoDelay, close, connect, connectWithoutProxy, getActiveStreamingResult, getCalendar, getDatabase, getDataTypeMappingFlags, getHost, getHostAddress, getLock, getMajorServerVersion, getMinorServerVersion, getOptions, getPacketFetcher, getPassword, getPinGlobalTxToPhysicalConnection, getPort, getProxy, getReadonly, getServerData, getServerThreadId, getServerVersion, getUrlParser, getUsername, getWriter, hasWarnings, isClosed, isConnected, isExplicitClosed, noBackslashEscapes, prepareStatementCache, readEofPacket, releaseWriterBuffer, removeActiveStreamingResult, setActiveStreamingResult, setHasWarnings, setHostAddress, setHostFailedWithoutProxy, setMoreResults, setProxy, setReadonly, shouldReconnectWithoutProxy, skip, skipEofPacket, versionGreaterOrEqual`

### Constructor Detail

#### AuroraProtocol

    public AuroraProtocol(UrlParser url,
                          ReentrantLock lock)

### Method Detail

#### searchProbableMaster

    public static void searchProbableMaster(AuroraListener listener,
                                            HostAddress probableMaster)

Connect aurora probable master. Aurora master change in time. The only way to check that a server is a master is to asked him.

Parameters:
  `listener` - aurora failover to call back if master is found
  `probableMaster` - probable master host

#### loop

    public static void loop(AuroraListener listener,
                            List<HostAddress> addresses,
                            SearchFilter searchFilter)
                     throws QueryException

loop until found the failed connection.

Parameters:
  `listener` - current failover
  `addresses` - list of HostAddress to loop
  `searchFilter` - search parameter
Throws:
  `QueryException` - if not found

#### getNewProtocol

    public static AuroraProtocol getNewProtocol(FailoverProxy proxy,
                                                UrlParser urlParser)

Initialize new protocol instance.

Parameters:
  `proxy` - proxy
  `urlParser` - connection string data's
Returns:
  new AuroraProtocol

#### isMasterConnection

    public boolean isMasterConnection()

Description copied from class: `AbstractConnectProtocol`
Indicate if current protocol is a master protocol.

Specified by:
  `isMasterConnection` in interface `Protocol`
Overrides:
  `isMasterConnection` in class `AbstractConnectProtocol`
Returns:
  is master flag

#### checkIfMaster

    public boolean checkIfMaster()
                          throws QueryException

Aurora best way to check if a node is a master : is not in read-only mode.

Specified by:
  `checkIfMaster` in interface `Protocol`
Overrides:
  `checkIfMaster` in class `AbstractConnectProtocol`
Returns:
  indicate if master has been found
Throws:
  `QueryException`