org.mariadb.jdbc.internal.mysql

## Class AuroraProtocol

- java.lang.Object
- - org.mariadb.jdbc.internal.mysql.MySQLProtocol
  - - org.mariadb.jdbc.internal.mysql.MastersSlavesProtocol
    - - org.mariadb.jdbc.internal.mysql.AuroraProtocol

All Implemented Interfaces:
  Protocol

    public class AuroraProtocol
    extends MastersSlavesProtocol

### Field Summary

### Fields inherited from class org.mariadb.jdbc.internal.mysql.MySQLProtocol

`activeResult, currentHost, datatypeMappingFlags, hasWarnings, jdbcUrl, lock, moreResults, packetFetcher, proxy, readOnly, serverStatus, socket, writer`

### Constructor Summary

Constructors
Constructor and Description
`AuroraProtocol(JDBCUrl url, ReentrantReadWriteLock 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, JDBCUrl jdbcUrl)`
`boolean` `isMasterConnection()`
`static void` `loop(AuroraListener listener, List<HostAddress> addresses, Map<HostAddress,Long> blacklist, SearchFilter searchFilter)` loop until found the failed connection.
`static void` `searchProbableMaster(AuroraListener listener, HostAddress probableMaster, Map<HostAddress,Long> blacklist, SearchFilter searchFilter)`

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

`loop, mustBeMasterConnection, setMustBeMasterConnection`

### Methods inherited from class org.mariadb.jdbc.internal.mysql.MySQLProtocol

`cancelCurrentQuery, close, close, closeExplicit, closeIfActiveResult, closePreparedStatement, connect, connectWithoutProxy, executeBatch, executePreparedQuery, executePreparedQueryAfterFailover, executeQuery, executeQuery, executeQuery, getAutocommit, getCalendar, getDatabase, getDatatypeMappingFlags, getHost, getHostAddress, getJdbcUrl, getMajorServerVersion, getMaxRows, getMinorServerVersion, getMoreResults, getOptions, getPassword, getPinGlobalTxToPhysicalConnection, getPort, getProxy, getReadonly, getResult, getServerData, getServerThreadId, getServerVersion, getTimeout, getTransactionIsolationLevel, getUsername, hasMoreResults, hasUnreadData, hasWarnings, hexdump, hexdump, inTransaction, isClosed, isConnected, isExplicitClosed, loop, noBackslashEscapes, ping, prepare, prepareStatementCache, releasePrepareStatement, rollback, setCatalog, setHostAddress, setHostFailedWithoutProxy, setInternalMaxRows, setLocalInfileInputStream, setMaxRows, setProxy, setReadonly, setTimeout, setTransactionIsolation, shouldReconnectWithoutProxy, versionGreaterOrEqual`

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

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

### Constructor Detail

#### AuroraProtocol

    public AuroraProtocol(JDBCUrl url,
                          ReentrantReadWriteLock lock)

### Method Detail

#### searchProbableMaster

    public static void searchProbableMaster(AuroraListener listener,
                                            HostAddress probableMaster,
                                            Map<HostAddress,Long> blacklist,
                                            SearchFilter searchFilter)
                                     throws QueryException

Throws:
  `QueryException`

#### loop

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

loop until found the failed connection.

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

#### getNewProtocol

    public static AuroraProtocol getNewProtocol(FailoverProxy proxy,
                                                JDBCUrl jdbcUrl)

#### isMasterConnection

    public boolean isMasterConnection()

Specified by:
  `isMasterConnection` in interface `Protocol`
Overrides:
  `isMasterConnection` in class `MySQLProtocol`

#### 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 `MySQLProtocol`
Returns:
  indicate if master has been found
Throws:
  `QueryException`