# Interface Protocol

All Known Implementing Classes:
  `AbstractConnectProtocol, AbstractQueryProtocol, AuroraProtocol, MasterProtocol, MastersReplicasProtocol`

public interface Protocol

## Method Summary

Modifier and Type
Method
Description
`void`
`abort()`
`void`
`cancelCurrentQuery()`
`void`
`changeSocketSoTimeout(int setSoTimeout)`
`void`
`changeSocketTcpNoDelay(boolean setTcpNoDelay)`
`boolean`
`checkIfMaster()`
`void`
`close()`
`void`
`closeExplicit()`
`void`
`connect()`
`void`
`connectWithoutProxy()`
`boolean`
`executeBatchClient(boolean mustExecuteOnMaster, Results results, ClientPrepareResult prepareResult, List<ParameterHolder[]> parametersList)`
`boolean`
`executeBatchServer(boolean mustExecuteOnMaster, ServerPrepareResult serverPrepareResult, Results results, String sql, List<ParameterHolder[]> parameterList)`
`void`
`executeBatchStmt(boolean mustExecuteOnMaster, Results results, List<String> queries)`
`void`
`executePreparedQuery(boolean mustExecuteOnMaster, ServerPrepareResult serverPrepareResult, Results results, ParameterHolder[] parameters)`
`void`
`executeQuery(boolean mustExecuteOnMaster, Results results, String sql)`
`void`
`executeQuery(boolean mustExecuteOnMaster, Results results, String sql, Charset charset)`
`void`
`executeQuery(boolean mustExecuteOnMaster, Results results, ClientPrepareResult clientPrepareResult, ParameterHolder[] parameters)`
`void`
`executeQuery(boolean mustExecuteOnMaster, Results results, ClientPrepareResult clientPrepareResult, ParameterHolder[] parameters, int timeout)`
`void`
`executeQuery(String sql)`
`boolean`
`forceReleasePrepareStatement(int statementId)`
`void`
`forceReleaseWaitingPrepareStatement()`
`Results`
`getActiveStreamingResult()`
`boolean`
`getAutocommit()`
`int`
`getAutoIncrementIncrement()`
`String`
`getCatalog()`
`String`
`getDatabase()`
`String`
`getHost()`
`HostAddress`
`getHostAddress()`
`ReentrantLock`
`getLock()`
`int`
`getMajorServerVersion()`
`long`
`getMaxRows()`
`int`
`getMinorServerVersion()`
`Options`
`getOptions()`
`int`
`getPatchServerVersion()`
`boolean`
`getPinGlobalTxToPhysicalConnection()`
`int`
`getPort()`
`FailoverProxy`
`getProxy()`
`PacketInputStream`
`getReader()`
`boolean`
`getReadonly()`
`void`
`getResult(Results results)`
`long`
`getServerThreadId()`
`String`
`getServerVersion()`
`Socket`
`getSocket()`
`int`
`getTimeout()`
`TimeZone`
`getTimeZone()`
`String`
`getTraces()`
`int`
`getTransactionIsolationLevel()`
`UrlParser`
`getUrlParser()`
`String`
`getUsername()`
`SQLException`
`handleIoException(Exception initialException)`
`boolean`
`hasMoreResults()`
`boolean`
`hasWarnings()`
`void`
`interrupt()`
`boolean`
`inTransaction()`
`boolean`
`isClosed()`
`boolean`
`isConnected()`
`boolean`
`isEofDeprecated()`
`boolean`
`isExplicitClosed()`
`boolean`
`isInterrupted()`
`boolean`
`isMasterConnection()`
`boolean`
`isServerMariaDb()`
`boolean`
`isValid(int timeout)`
`boolean`
`mustBeMasterConnection()`
`boolean`
`noBackslashEscapes()`
`boolean`
`ping()`
`ServerPrepareResult`
`prepare(String sql, boolean executeOnMaster)`
`ServerPrepareStatementCache`
`prepareStatementCache()`
`void`
`prolog(long maxRows, boolean hasProxy, MariaDbConnection connection, MariaDbStatement statement)`
`void`
`prologProxy(ServerPrepareResult serverPrepareResult, long maxRows, boolean hasProxy, MariaDbConnection connection, MariaDbStatement statement)`
`ServerPrepareResult`
`putInCache(String key, ServerPrepareResult serverPrepareResult)`
`void`
`readEofPacket()`
`void`
`releasePrepareStatement(ServerPrepareResult serverPrepareResult)`
`void`
`removeActiveStreamingResult()`
`void`
`removeHasMoreResults()`
`void`
`reset()`
`void`
`resetDatabase()`
`void`
`resetStateAfterFailover(long maxRows, int transactionIsolationLevel, String database, boolean autocommit)`
`void`
`rollback()`
`boolean`
`sessionStateAware()`
`void`
`setActiveFutureTask(FutureTask activeFutureTask)`
`void`
`setActiveStreamingResult(Results mariaSelectResultSet)`
`void`
`setCatalog(String database)`
`void`
`setHasWarnings(boolean hasWarnings)`
`void`
`setHostAddress(HostAddress hostAddress)`
`void`
`setHostFailedWithoutProxy()`
`void`
`setLocalInfileInputStream(InputStream inputStream)`
`void`
`setMaxRows(long max)`
`void`
`setProxy(FailoverProxy proxy)`
`void`
`setReadonly(boolean readOnly)`
`void`
`setServerStatus(short serverStatus)`
`void`
`setTimeout(int timeout)`
`void`
`setTransactionIsolation(int level)`
`boolean`
`shouldReconnectWithoutProxy()`
`void`
`skip()`
`void`
`skipEofPacket()`
`void`
`stopIfInterrupted()`
`boolean`
`versionGreaterOrEqual(int major, int minor, int patch)`

## Method Details

### prepare

ServerPrepareResult prepare(String sql, boolean executeOnMaster) throws SQLException

Throws:
  `SQLException`

### getAutocommit

boolean getAutocommit() throws SQLException

Throws:
  `SQLException`

### noBackslashEscapes

boolean noBackslashEscapes()

### connect

void connect() throws SQLException

Throws:
  `SQLException`

### getUrlParser

UrlParser getUrlParser()

### inTransaction

boolean inTransaction()

### getProxy

FailoverProxy getProxy()

### setProxy

void setProxy(FailoverProxy proxy)

### getOptions

Options getOptions()

### hasMoreResults

boolean hasMoreResults()

### close

void close()

### abort

void abort()

### reset

void reset() throws SQLException

Throws:
  `SQLException`

### closeExplicit

void closeExplicit()

### isClosed

boolean isClosed()

### resetDatabase

void resetDatabase() throws SQLException

Throws:
  `SQLException`

### getCatalog

String getCatalog() throws SQLException

Throws:
  `SQLException`

### setCatalog

void setCatalog(String database) throws SQLException

Throws:
  `SQLException`

### getServerVersion

String getServerVersion()

### isConnected

boolean isConnected()

### getReadonly

boolean getReadonly() throws SQLException

Throws:
  `SQLException`

### setReadonly

void setReadonly(boolean readOnly) throws SQLException

Throws:
  `SQLException`

### isMasterConnection

boolean isMasterConnection()

### mustBeMasterConnection

boolean mustBeMasterConnection()

### getHostAddress

HostAddress getHostAddress()

### setHostAddress

void setHostAddress(HostAddress hostAddress)

### getHost

String getHost()

### getPort

int getPort()

### rollback

void rollback() throws SQLException

Throws:
  `SQLException`

### getDatabase

String getDatabase()

### getUsername

String getUsername()

### ping

boolean ping() throws SQLException

Throws:
  `SQLException`

### isValid

boolean isValid(int timeout) throws SQLException

Throws:
  `SQLException`

### executeQuery

void executeQuery(String sql) throws SQLException

Throws:
  `SQLException`

### executeQuery

void executeQuery(boolean mustExecuteOnMaster, Results results, String sql) throws SQLException

Throws:
  `SQLException`

### executeQuery

void executeQuery(boolean mustExecuteOnMaster, Results results, String sql, Charset charset) throws SQLException

Throws:
  `SQLException`

### executeQuery

void executeQuery(boolean mustExecuteOnMaster, Results results, ClientPrepareResult clientPrepareResult, ParameterHolder[] parameters) throws SQLException

Throws:
  `SQLException`

### executeQuery

void executeQuery(boolean mustExecuteOnMaster, Results results, ClientPrepareResult clientPrepareResult, ParameterHolder[] parameters, int timeout) throws SQLException

Throws:
  `SQLException`

### executeBatchClient

boolean executeBatchClient(boolean mustExecuteOnMaster, Results results, ClientPrepareResult prepareResult, List<ParameterHolder[]> parametersList) throws SQLException

Throws:
  `SQLException`

### executeBatchStmt

void executeBatchStmt(boolean mustExecuteOnMaster, Results results, List<String> queries) throws SQLException

Throws:
  `SQLException`

### executePreparedQuery

void executePreparedQuery(boolean mustExecuteOnMaster, ServerPrepareResult serverPrepareResult, Results results, ParameterHolder[] parameters) throws SQLException

Throws:
  `SQLException`

### executeBatchServer

boolean executeBatchServer(boolean mustExecuteOnMaster, ServerPrepareResult serverPrepareResult, Results results, String sql, List<ParameterHolder[]> parameterList) throws SQLException

Throws:
  `SQLException`

### getResult

void getResult(Results results) throws SQLException

Throws:
  `SQLException`

### cancelCurrentQuery

void cancelCurrentQuery() throws SQLException

Throws:
  `SQLException`

### interrupt

void interrupt()

### skip

void skip() throws SQLException

Throws:
  `SQLException`

### checkIfMaster

boolean checkIfMaster() throws SQLException

Throws:
  `SQLException`

### hasWarnings

boolean hasWarnings()

### getMaxRows

long getMaxRows()

### setMaxRows

void setMaxRows(long max) throws SQLException

Throws:
  `SQLException`

### getMajorServerVersion

int getMajorServerVersion()

### getMinorServerVersion

int getMinorServerVersion()

### getPatchServerVersion

int getPatchServerVersion()

### versionGreaterOrEqual

boolean versionGreaterOrEqual(int major, int minor, int patch)

### setLocalInfileInputStream

void setLocalInfileInputStream(InputStream inputStream)

### getTimeout

int getTimeout()

### setTimeout

void setTimeout(int timeout) throws SocketException

Throws:
  `SocketException`

### getPinGlobalTxToPhysicalConnection

boolean getPinGlobalTxToPhysicalConnection()

### getServerThreadId

long getServerThreadId()

### getSocket

Socket getSocket()

### setTransactionIsolation

void setTransactionIsolation(int level) throws SQLException

Throws:
  `SQLException`

### getTransactionIsolationLevel

int getTransactionIsolationLevel()

### isExplicitClosed

boolean isExplicitClosed()

### connectWithoutProxy

void connectWithoutProxy() throws SQLException

Throws:
  `SQLException`

### shouldReconnectWithoutProxy

boolean shouldReconnectWithoutProxy()

### setHostFailedWithoutProxy

void setHostFailedWithoutProxy()

### releasePrepareStatement

void releasePrepareStatement(ServerPrepareResult serverPrepareResult) throws SQLException

Throws:
  `SQLException`

### forceReleasePrepareStatement

boolean forceReleasePrepareStatement(int statementId) throws SQLException

Throws:
  `SQLException`

### forceReleaseWaitingPrepareStatement

void forceReleaseWaitingPrepareStatement() throws SQLException

Throws:
  `SQLException`

### prepareStatementCache

ServerPrepareStatementCache prepareStatementCache()

### getTimeZone

TimeZone getTimeZone()

### prolog

void prolog(long maxRows, boolean hasProxy, MariaDbConnection connection, MariaDbStatement statement) throws SQLException

Throws:
  `SQLException`

### prologProxy

void prologProxy(ServerPrepareResult serverPrepareResult, long maxRows, boolean hasProxy, MariaDbConnection connection, MariaDbStatement statement) throws SQLException

Throws:
  `SQLException`

### getActiveStreamingResult

Results getActiveStreamingResult()

### setActiveStreamingResult

void setActiveStreamingResult(Results mariaSelectResultSet)

### getLock

ReentrantLock getLock()

### setServerStatus

void setServerStatus(short serverStatus)

### removeHasMoreResults

void removeHasMoreResults()

### setHasWarnings

void setHasWarnings(boolean hasWarnings)

### putInCache

ServerPrepareResult putInCache(String key, ServerPrepareResult serverPrepareResult)

### readEofPacket

void readEofPacket() throws SQLException, IOException

Throws:
  `SQLException`
  `IOException`

### skipEofPacket

void skipEofPacket() throws SQLException, IOException

Throws:
  `SQLException`
  `IOException`

### changeSocketTcpNoDelay

void changeSocketTcpNoDelay(boolean setTcpNoDelay)

### changeSocketSoTimeout

void changeSocketSoTimeout(int setSoTimeout) throws SocketException

Throws:
  `SocketException`

### removeActiveStreamingResult

void removeActiveStreamingResult()

### resetStateAfterFailover

void resetStateAfterFailover(long maxRows, int transactionIsolationLevel, String database, boolean autocommit) throws SQLException

Throws:
  `SQLException`

### setActiveFutureTask

void setActiveFutureTask(FutureTask activeFutureTask)

### isServerMariaDb

boolean isServerMariaDb()

### handleIoException

SQLException handleIoException(Exception initialException)

### getReader

PacketInputStream getReader()

### isEofDeprecated

boolean isEofDeprecated()

### getAutoIncrementIncrement

int getAutoIncrementIncrement() throws SQLException

Throws:
  `SQLException`

### sessionStateAware

boolean sessionStateAware()

### getTraces

String getTraces()

### isInterrupted

boolean isInterrupted()

### stopIfInterrupted

void stopIfInterrupted() throws SQLTimeoutException

Throws:
  `SQLTimeoutException`