Interface Protocol
-
- All Known Implementing Classes:
AbstractConnectProtocol,AbstractQueryProtocol,AuroraProtocol,MasterProtocol,MastersReplicasProtocol
public interface Protocol
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidabort()voidcancelCurrentQuery()voidchangeSocketSoTimeout(int setSoTimeout)voidchangeSocketTcpNoDelay(boolean setTcpNoDelay)booleancheckIfMaster()voidclose()voidcloseExplicit()voidconnect()voidconnectWithoutProxy()booleanexecuteBatchClient(boolean mustExecuteOnMaster, Results results, ClientPrepareResult prepareResult, java.util.List<ParameterHolder[]> parametersList)booleanexecuteBatchServer(boolean mustExecuteOnMaster, ServerPrepareResult serverPrepareResult, Results results, java.lang.String sql, java.util.List<ParameterHolder[]> parameterList)voidexecuteBatchStmt(boolean mustExecuteOnMaster, Results results, java.util.List<java.lang.String> queries)voidexecutePreparedQuery(boolean mustExecuteOnMaster, ServerPrepareResult serverPrepareResult, Results results, ParameterHolder[] parameters)voidexecuteQuery(boolean mustExecuteOnMaster, Results results, java.lang.String sql)voidexecuteQuery(boolean mustExecuteOnMaster, Results results, java.lang.String sql, java.nio.charset.Charset charset)voidexecuteQuery(boolean mustExecuteOnMaster, Results results, ClientPrepareResult clientPrepareResult, ParameterHolder[] parameters)voidexecuteQuery(boolean mustExecuteOnMaster, Results results, ClientPrepareResult clientPrepareResult, ParameterHolder[] parameters, int timeout)voidexecuteQuery(java.lang.String sql)booleanforceReleasePrepareStatement(int statementId)voidforceReleaseWaitingPrepareStatement()ResultsgetActiveStreamingResult()booleangetAutocommit()intgetAutoIncrementIncrement()java.lang.StringgetCatalog()java.lang.StringgetDatabase()java.lang.StringgetHost()HostAddressgetHostAddress()java.util.concurrent.locks.ReentrantLockgetLock()intgetMajorServerVersion()longgetMaxRows()intgetMinorServerVersion()OptionsgetOptions()booleangetPinGlobalTxToPhysicalConnection()intgetPort()FailoverProxygetProxy()PacketInputStreamgetReader()booleangetReadonly()voidgetResult(Results results)longgetServerThreadId()java.lang.StringgetServerVersion()java.net.SocketgetSocket()intgetTimeout()java.util.TimeZonegetTimeZone()java.lang.StringgetTraces()intgetTransactionIsolationLevel()UrlParsergetUrlParser()java.lang.StringgetUsername()java.sql.SQLExceptionhandleIoException(java.lang.Exception initialException)booleanhasMoreResults()booleanhasWarnings()voidinterrupt()booleaninTransaction()booleanisClosed()booleanisConnected()booleanisEofDeprecated()booleanisExplicitClosed()booleanisInterrupted()booleanisMasterConnection()booleanisServerMariaDb()booleanisValid(int timeout)booleanmustBeMasterConnection()booleannoBackslashEscapes()booleanping()ServerPrepareResultprepare(java.lang.String sql, boolean executeOnMaster)ServerPrepareStatementCacheprepareStatementCache()voidprolog(long maxRows, boolean hasProxy, MariaDbConnection connection, MariaDbStatement statement)voidprologProxy(ServerPrepareResult serverPrepareResult, long maxRows, boolean hasProxy, MariaDbConnection connection, MariaDbStatement statement)ServerPrepareResultputInCache(java.lang.String key, ServerPrepareResult serverPrepareResult)voidreadEofPacket()voidreleasePrepareStatement(ServerPrepareResult serverPrepareResult)voidremoveActiveStreamingResult()voidremoveHasMoreResults()voidreset()voidresetDatabase()voidresetStateAfterFailover(long maxRows, int transactionIsolationLevel, java.lang.String database, boolean autocommit)voidrollback()booleansessionStateAware()voidsetActiveFutureTask(java.util.concurrent.FutureTask activeFutureTask)voidsetActiveStreamingResult(Results mariaSelectResultSet)voidsetCatalog(java.lang.String database)voidsetHasWarnings(boolean hasWarnings)voidsetHostAddress(HostAddress hostAddress)voidsetHostFailedWithoutProxy()voidsetLocalInfileInputStream(java.io.InputStream inputStream)voidsetMaxRows(long max)voidsetProxy(FailoverProxy proxy)voidsetReadonly(boolean readOnly)voidsetServerStatus(short serverStatus)voidsetTimeout(int timeout)voidsetTransactionIsolation(int level)booleanshouldReconnectWithoutProxy()voidskip()voidskipEofPacket()voidstopIfInterrupted()booleanversionGreaterOrEqual(int major, int minor, int patch)
-
-
-
Method Detail
-
prepare
ServerPrepareResult prepare(java.lang.String sql, boolean executeOnMaster) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getAutocommit
boolean getAutocommit() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
noBackslashEscapes
boolean noBackslashEscapes()
-
connect
void connect() throws java.sql.SQLException- Throws:
java.sql.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 java.sql.SQLException- Throws:
java.sql.SQLException
-
closeExplicit
void closeExplicit()
-
isClosed
boolean isClosed()
-
resetDatabase
void resetDatabase() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getCatalog
java.lang.String getCatalog() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setCatalog
void setCatalog(java.lang.String database) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getServerVersion
java.lang.String getServerVersion()
-
isConnected
boolean isConnected()
-
getReadonly
boolean getReadonly() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setReadonly
void setReadonly(boolean readOnly) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
isMasterConnection
boolean isMasterConnection()
-
mustBeMasterConnection
boolean mustBeMasterConnection()
-
getHostAddress
HostAddress getHostAddress()
-
setHostAddress
void setHostAddress(HostAddress hostAddress)
-
getHost
java.lang.String getHost()
-
getPort
int getPort()
-
rollback
void rollback() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getDatabase
java.lang.String getDatabase()
-
getUsername
java.lang.String getUsername()
-
ping
boolean ping() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
isValid
boolean isValid(int timeout) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
executeQuery
void executeQuery(java.lang.String sql) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
executeQuery
void executeQuery(boolean mustExecuteOnMaster, Results results, java.lang.String sql) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
executeQuery
void executeQuery(boolean mustExecuteOnMaster, Results results, java.lang.String sql, java.nio.charset.Charset charset) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
executeQuery
void executeQuery(boolean mustExecuteOnMaster, Results results, ClientPrepareResult clientPrepareResult, ParameterHolder[] parameters) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
executeQuery
void executeQuery(boolean mustExecuteOnMaster, Results results, ClientPrepareResult clientPrepareResult, ParameterHolder[] parameters, int timeout) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
executeBatchClient
boolean executeBatchClient(boolean mustExecuteOnMaster, Results results, ClientPrepareResult prepareResult, java.util.List<ParameterHolder[]> parametersList) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
executeBatchStmt
void executeBatchStmt(boolean mustExecuteOnMaster, Results results, java.util.List<java.lang.String> queries) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
executePreparedQuery
void executePreparedQuery(boolean mustExecuteOnMaster, ServerPrepareResult serverPrepareResult, Results results, ParameterHolder[] parameters) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
executeBatchServer
boolean executeBatchServer(boolean mustExecuteOnMaster, ServerPrepareResult serverPrepareResult, Results results, java.lang.String sql, java.util.List<ParameterHolder[]> parameterList) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getResult
void getResult(Results results) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
cancelCurrentQuery
void cancelCurrentQuery() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
interrupt
void interrupt()
-
skip
void skip() throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
checkIfMaster
boolean checkIfMaster() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
hasWarnings
boolean hasWarnings()
-
getMaxRows
long getMaxRows()
-
setMaxRows
void setMaxRows(long max) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getMajorServerVersion
int getMajorServerVersion()
-
getMinorServerVersion
int getMinorServerVersion()
-
versionGreaterOrEqual
boolean versionGreaterOrEqual(int major, int minor, int patch)
-
setLocalInfileInputStream
void setLocalInfileInputStream(java.io.InputStream inputStream)
-
getTimeout
int getTimeout()
-
setTimeout
void setTimeout(int timeout) throws java.net.SocketException- Throws:
java.net.SocketException
-
getPinGlobalTxToPhysicalConnection
boolean getPinGlobalTxToPhysicalConnection()
-
getServerThreadId
long getServerThreadId()
-
getSocket
java.net.Socket getSocket()
-
setTransactionIsolation
void setTransactionIsolation(int level) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
getTransactionIsolationLevel
int getTransactionIsolationLevel()
-
isExplicitClosed
boolean isExplicitClosed()
-
connectWithoutProxy
void connectWithoutProxy() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
shouldReconnectWithoutProxy
boolean shouldReconnectWithoutProxy()
-
setHostFailedWithoutProxy
void setHostFailedWithoutProxy()
-
releasePrepareStatement
void releasePrepareStatement(ServerPrepareResult serverPrepareResult) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
forceReleasePrepareStatement
boolean forceReleasePrepareStatement(int statementId) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
forceReleaseWaitingPrepareStatement
void forceReleaseWaitingPrepareStatement() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
prepareStatementCache
ServerPrepareStatementCache prepareStatementCache()
-
getTimeZone
java.util.TimeZone getTimeZone()
-
prolog
void prolog(long maxRows, boolean hasProxy, MariaDbConnection connection, MariaDbStatement statement) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
prologProxy
void prologProxy(ServerPrepareResult serverPrepareResult, long maxRows, boolean hasProxy, MariaDbConnection connection, MariaDbStatement statement) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getActiveStreamingResult
Results getActiveStreamingResult()
-
setActiveStreamingResult
void setActiveStreamingResult(Results mariaSelectResultSet)
-
getLock
java.util.concurrent.locks.ReentrantLock getLock()
-
setServerStatus
void setServerStatus(short serverStatus)
-
removeHasMoreResults
void removeHasMoreResults()
-
setHasWarnings
void setHasWarnings(boolean hasWarnings)
-
putInCache
ServerPrepareResult putInCache(java.lang.String key, ServerPrepareResult serverPrepareResult)
-
readEofPacket
void readEofPacket() throws java.sql.SQLException, java.io.IOException- Throws:
java.sql.SQLExceptionjava.io.IOException
-
skipEofPacket
void skipEofPacket() throws java.sql.SQLException, java.io.IOException- Throws:
java.sql.SQLExceptionjava.io.IOException
-
changeSocketTcpNoDelay
void changeSocketTcpNoDelay(boolean setTcpNoDelay)
-
changeSocketSoTimeout
void changeSocketSoTimeout(int setSoTimeout) throws java.net.SocketException- Throws:
java.net.SocketException
-
removeActiveStreamingResult
void removeActiveStreamingResult()
-
resetStateAfterFailover
void resetStateAfterFailover(long maxRows, int transactionIsolationLevel, java.lang.String database, boolean autocommit) throws java.sql.SQLException- Throws:
java.sql.SQLException
-
setActiveFutureTask
void setActiveFutureTask(java.util.concurrent.FutureTask activeFutureTask)
-
isServerMariaDb
boolean isServerMariaDb()
-
handleIoException
java.sql.SQLException handleIoException(java.lang.Exception initialException)
-
getReader
PacketInputStream getReader()
-
isEofDeprecated
boolean isEofDeprecated()
-
getAutoIncrementIncrement
int getAutoIncrementIncrement() throws java.sql.SQLException- Throws:
java.sql.SQLException
-
sessionStateAware
boolean sessionStateAware()
-
getTraces
java.lang.String getTraces()
-
isInterrupted
boolean isInterrupted()
-
stopIfInterrupted
void stopIfInterrupted() throws java.sql.SQLTimeoutException- Throws:
java.sql.SQLTimeoutException
-
-