org.mariadb.jdbc.internal.protocol

## Interface Protocol

All Known Implementing Classes:
  AbstractConnectProtocol, AbstractQueryProtocol, AuroraProtocol, MasterProtocol, MastersSlavesProtocol

    public interface Protocol

### Method Summary

All Methods Instance Methods Abstract Methods
`ServerPrepareResult` `addPrepareInCache(String key, ServerPrepareResult serverPrepareResult)`
`void` `cancelCurrentQuery()`
`void` `changeSocketSoTimeout(int setSoTimeout)`
`void` `changeSocketTcpNoDelay(boolean setTcpNoDelay)`
`boolean` `checkIfMaster()`
`void` `close()`
`void` `closeExplicit()`
`void` `connect()`
`void` `connectWithoutProxy()`
`void` `executeBatch(boolean mustExecuteOnMaster, Results results, List<String> queries)`
`void` `executeBatchMulti(boolean mustExecuteOnMaster, Results results, ClientPrepareResult clientPrepareResult, List<ParameterHolder[]> parameterList)`
`void` `executeBatchMultiple(boolean mustExecuteOnMaster, Results results, List<String> queries)`
`void` `executeBatchRewrite(boolean mustExecuteOnMaster, Results results, ClientPrepareResult prepareResult, List<ParameterHolder[]> parameterList, boolean rewriteValues)`
`void` `executePreparedQuery(boolean mustExecuteOnMaster, ServerPrepareResult serverPrepareResult, Results results, ParameterHolder[] parameters)`
`void` `executeQuery(boolean mustExecuteOnMaster, Results results, ClientPrepareResult clientPrepareResult, ParameterHolder[] parameters)`
`void` `executeQuery(boolean mustExecuteOnMaster, Results results, String sql)`
`void` `executeQuery(boolean mustExecuteOnMaster, Results results, String sql, Charset charset)`
`void` `executeQuery(String sql)`
`boolean` `forceReleasePrepareStatement(int statementId)`
`void` `forceReleaseWaitingPrepareStatement()`
`Results` `getActiveStreamingResult()`
`boolean` `getAutocommit()`
`Calendar` `getCalendar()`
`String` `getDatabase()`
`int` `getDataTypeMappingFlags()`
`String` `getHost()`
`HostAddress` `getHostAddress()`
`ReentrantLock` `getLock()`
`int` `getMajorServerVersion()`
`int` `getMaxRows()`
`int` `getMinorServerVersion()`
`Options` `getOptions()`
`ReadPacketFetcher` `getPacketFetcher()`
`String` `getPassword()`
`boolean` `getPinGlobalTxToPhysicalConnection()`
`int` `getPort()`
`FailoverProxy` `getProxy()`
`boolean` `getReadonly()`
`void` `getResult(Results results)`
`String` `getServerData(String code)`
`long` `getServerThreadId()`
`String` `getServerVersion()`
`int` `getTimeout()`
`int` `getTransactionIsolationLevel()`
`UrlParser` `getUrlParser()`
`String` `getUsername()`
`ByteBuffer` `getWriter()`
`boolean` `hasMoreResults()`
`boolean` `hasWarnings()`
`boolean` `inTransaction()`
`boolean` `isClosed()`
`boolean` `isConnected()`
`boolean` `isExplicitClosed()`
`boolean` `isMasterConnection()`
`boolean` `isServerMariaDb()`
`boolean` `mustBeMasterConnection()`
`boolean` `noBackslashEscapes()`
`boolean` `ping()`
`ServerPrepareResult` `prepare(String sql, boolean executeOnMaster)`
`ServerPrepareResult` `prepareAndExecute(boolean mustExecuteOnMaster, ServerPrepareResult serverPrepareResult, Results results, String sql, ParameterHolder[] parameters)`
`ServerPrepareResult` `prepareAndExecutes(boolean mustExecuteOnMaster, ServerPrepareResult serverPrepareResult, Results results, String sql, List<ParameterHolder[]> parameterList)`
`ServerPrepareStatementCache` `prepareStatementCache()`
`void` `prolog(Results results, int maxRows, boolean hasProxy, MariaDbConnection connection, MariaDbStatement statement)`
`void` `prologProxy(ServerPrepareResult serverPrepareResult, Results results, int maxRows, boolean hasProxy, MariaDbConnection connection, MariaDbStatement statement)`
`void` `readEofPacket()`
`void` `releasePrepareStatement(ServerPrepareResult serverPrepareResult)`
`void` `releaseWriterBuffer()`
`void` `removeActiveStreamingResult()`
`void` `resetStateAfterFailover(int maxRows, int transactionIsolationLevel, String database, boolean autocommit)`
`void` `rollback()`
`void` `setActiveFutureTask(FutureTask activeFutureTask)`
`void` `setActiveStreamingResult(Results mariaSelectResultSet)`
`void` `setCatalog(String database)`
`void` `setHasWarnings(boolean hasWarnings)`
`void` `setHostAddress(HostAddress hostAddress)`
`void` `setHostFailedWithoutProxy()`
`void` `setInternalMaxRows(int max)`
`void` `setLocalInfileInputStream(InputStream inputStream)`
`void` `setMaxRows(int max)`
`void` `setMoreResults(boolean moreResults)`
`void` `setProxy(FailoverProxy proxy)`
`void` `setReadonly(boolean readOnly)`
`void` `setTimeout(int timeout)`
`void` `setTransactionIsolation(int level)`
`boolean` `shouldReconnectWithoutProxy()`
`void` `skip()`
`void` `skipEofPacket()`
`boolean` `versionGreaterOrEqual(int major, int minor, int patch)`

### Method Detail

#### prepare

    ServerPrepareResult prepare(String sql,
                                boolean executeOnMaster)
                         throws QueryException

Throws:
  `QueryException`

#### getAutocommit

    boolean getAutocommit()

#### noBackslashEscapes

    boolean noBackslashEscapes()

#### connect

    void connect()
          throws QueryException

Throws:
  `QueryException`

#### getUrlParser

    UrlParser getUrlParser()

#### inTransaction

    boolean inTransaction()

#### getProxy

    FailoverProxy getProxy()

#### setProxy

    void setProxy(FailoverProxy proxy)

#### getOptions

    Options getOptions()

#### hasMoreResults

    boolean hasMoreResults()

#### close

    void close()

#### closeExplicit

    void closeExplicit()

#### isClosed

    boolean isClosed()

#### setCatalog

    void setCatalog(String database)
             throws QueryException

Throws:
  `QueryException`

#### getServerVersion

    String getServerVersion()

#### isConnected

    boolean isConnected()

#### getReadonly

    boolean getReadonly()

#### setReadonly

    void setReadonly(boolean readOnly)
              throws QueryException

Throws:
  `QueryException`

#### isMasterConnection

    boolean isMasterConnection()

#### mustBeMasterConnection

    boolean mustBeMasterConnection()

#### getHostAddress

    HostAddress getHostAddress()

#### setHostAddress

    void setHostAddress(HostAddress hostAddress)

#### getHost

    String getHost()

#### getPort

    int getPort()

#### rollback

    void rollback()
           throws QueryException

Throws:
  `QueryException`

#### getDatabase

    String getDatabase()

#### getUsername

    String getUsername()

#### getPassword

    String getPassword()

#### ping

    boolean ping()
          throws QueryException

Throws:
  `QueryException`

#### executeQuery

    void executeQuery(String sql)
               throws QueryException

Throws:
  `QueryException`

#### executeQuery

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

Throws:
  `QueryException`

#### executeQuery

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

Throws:
  `QueryException`

#### executeQuery

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

Throws:
  `QueryException`

#### executeBatchMulti

    void executeBatchMulti(boolean mustExecuteOnMaster,
                           Results results,
                           ClientPrepareResult clientPrepareResult,
                           List<ParameterHolder[]> parameterList)
                    throws QueryException

Throws:
  `QueryException`

#### executeBatch

    void executeBatch(boolean mustExecuteOnMaster,
                      Results results,
                      List<String> queries)
               throws QueryException

Throws:
  `QueryException`

#### executeBatchMultiple

    void executeBatchMultiple(boolean mustExecuteOnMaster,
                              Results results,
                              List<String> queries)
                       throws QueryException

Throws:
  `QueryException`

#### executeBatchRewrite

    void executeBatchRewrite(boolean mustExecuteOnMaster,
                             Results results,
                             ClientPrepareResult prepareResult,
                             List<ParameterHolder[]> parameterList,
                             boolean rewriteValues)
                      throws QueryException

Throws:
  `QueryException`

#### executePreparedQuery

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

Throws:
  `QueryException`

#### prepareAndExecutes

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

Throws:
  `QueryException`

#### prepareAndExecute

    ServerPrepareResult prepareAndExecute(boolean mustExecuteOnMaster,
                                          ServerPrepareResult serverPrepareResult,
                                          Results results,
                                          String sql,
                                          ParameterHolder[] parameters)
                                   throws QueryException

Throws:
  `QueryException`

#### getResult

    void getResult(Results results)
            throws QueryException

Throws:
  `QueryException`

#### cancelCurrentQuery

    void cancelCurrentQuery()
                     throws QueryException,
                            IOException

Throws:
  `QueryException`
  `IOException`

#### skip

    void skip()
       throws SQLException,
              QueryException

Throws:
  `SQLException`
  `QueryException`

#### checkIfMaster

    boolean checkIfMaster()
                   throws QueryException

Throws:
  `QueryException`

#### hasWarnings

    boolean hasWarnings()

#### getDataTypeMappingFlags

    int getDataTypeMappingFlags()

#### setInternalMaxRows

    void setInternalMaxRows(int max)

#### getMaxRows

    int getMaxRows()

#### setMaxRows

    void setMaxRows(int max)
             throws QueryException

Throws:
  `QueryException`

#### getMajorServerVersion

    int getMajorServerVersion()

#### getMinorServerVersion

    int getMinorServerVersion()

#### versionGreaterOrEqual

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

#### setLocalInfileInputStream

    void setLocalInfileInputStream(InputStream inputStream)

#### getTimeout

    int getTimeout()
            throws SocketException

Throws:
  `SocketException`

#### setTimeout

    void setTimeout(int timeout)
             throws SocketException

Throws:
  `SocketException`

#### getPinGlobalTxToPhysicalConnection

    boolean getPinGlobalTxToPhysicalConnection()

#### getServerThreadId

    long getServerThreadId()

#### setTransactionIsolation

    void setTransactionIsolation(int level)
                          throws QueryException

Throws:
  `QueryException`

#### getTransactionIsolationLevel

    int getTransactionIsolationLevel()

#### isExplicitClosed

    boolean isExplicitClosed()

#### connectWithoutProxy

    void connectWithoutProxy()
                      throws QueryException

Throws:
  `QueryException`

#### shouldReconnectWithoutProxy

    boolean shouldReconnectWithoutProxy()

#### setHostFailedWithoutProxy

    void setHostFailedWithoutProxy()

#### releasePrepareStatement

    void releasePrepareStatement(ServerPrepareResult serverPrepareResult)
                          throws QueryException

Throws:
  `QueryException`

#### forceReleasePrepareStatement

    boolean forceReleasePrepareStatement(int statementId)
                                  throws QueryException

Throws:
  `QueryException`

#### forceReleaseWaitingPrepareStatement

    void forceReleaseWaitingPrepareStatement()
                                      throws QueryException

Throws:
  `QueryException`

#### prepareStatementCache

    ServerPrepareStatementCache prepareStatementCache()

#### getServerData

    String getServerData(String code)

#### getCalendar

    Calendar getCalendar()

#### prolog

    void prolog(Results results,
                int maxRows,
                boolean hasProxy,
                MariaDbConnection connection,
                MariaDbStatement statement)
         throws SQLException

Throws:
  `SQLException`

#### prologProxy

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

Throws:
  `SQLException`

#### getActiveStreamingResult

    Results getActiveStreamingResult()

#### setActiveStreamingResult

    void setActiveStreamingResult(Results mariaSelectResultSet)

#### getLock

    ReentrantLock getLock()

#### setMoreResults

    void setMoreResults(boolean moreResults)

#### setHasWarnings

    void setHasWarnings(boolean hasWarnings)

#### releaseWriterBuffer

    void releaseWriterBuffer()

#### getWriter

    ByteBuffer getWriter()

#### addPrepareInCache

    ServerPrepareResult addPrepareInCache(String key,
                                          ServerPrepareResult serverPrepareResult)

#### readEofPacket

    void readEofPacket()
                throws QueryException,
                       IOException

Throws:
  `QueryException`
  `IOException`

#### skipEofPacket

    void skipEofPacket()
                throws QueryException,
                       IOException

Throws:
  `QueryException`
  `IOException`

#### getPacketFetcher

    ReadPacketFetcher getPacketFetcher()

#### changeSocketTcpNoDelay

    void changeSocketTcpNoDelay(boolean setTcpNoDelay)
                         throws SocketException

Throws:
  `SocketException`

#### changeSocketSoTimeout

    void changeSocketSoTimeout(int setSoTimeout)
                        throws SocketException

Throws:
  `SocketException`

#### removeActiveStreamingResult

    void removeActiveStreamingResult()

#### resetStateAfterFailover

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

Throws:
  `QueryException`

#### setActiveFutureTask

    void setActiveFutureTask(FutureTask activeFutureTask)

#### isServerMariaDb

    boolean isServerMariaDb()