Modifier and Type | Method and Description |
---|---|
protected void |
MariaDbStatement.executeQueryEpilog(QueryException queryException)
Reset timeout after query, re-throw SQL exception
|
Modifier and Type | Method and Description |
---|---|
HandleErrorResult |
Listener.handleFailover(QueryException qe,
Method method,
Object[] args,
Protocol protocol) |
HandleErrorResult |
AbstractMastersSlavesListener.handleFailover(QueryException qe,
Method method,
Object[] args,
Protocol protocol)
Handle failover on master or slave connection.
|
HandleErrorResult |
AbstractMastersListener.handleFailover(QueryException qe,
Method method,
Object[] args,
Protocol protocol)
Call when a failover is detected on master connection.
|
boolean |
FailoverProxy.hasToHandleFailover(QueryException exception)
Check if this Sqlerror is a connection exception. if that's the case, must be handle by failover
error codes :
08000 : connection exception
08001 : SQL client unable to establish SQL connection
08002 : connection name in use
08003 : connection does not exist
08004 : SQL server rejected SQL connection
08006 : connection failure
08007 : transaction resolution unknown
70100 : connection was killed
|
void |
Listener.throwFailoverMessage(HostAddress failHostAddress,
boolean wasMaster,
QueryException queryException,
boolean reconnected) |
void |
AbstractMastersListener.throwFailoverMessage(HostAddress failHostAddress,
boolean wasMaster,
QueryException queryException,
boolean reconnected)
Throw a human readable message after a failoverException.
|
Modifier and Type | Method and Description |
---|---|
void |
Listener.foundActiveMaster(Protocol protocol) |
abstract void |
AbstractMastersSlavesListener.foundActiveSecondary(Protocol newSecondaryProtocol) |
void |
Listener.initializeConnection() |
void |
AbstractMastersListener.initializeConnection()
Initialize Listener.
|
protected void |
AbstractMastersListener.preAutoReconnect() |
void |
Listener.preExecute() |
abstract void |
AbstractMastersListener.preExecute() |
void |
Listener.reconnect() |
abstract void |
AbstractMastersListener.reconnect() |
void |
Listener.reconnectFailedConnection(SearchFilter filter) |
abstract void |
AbstractMastersListener.reconnectFailedConnection(SearchFilter filter) |
void |
Listener.rePrepareOnSlave(ServerPrepareResult oldServerPrepareResult,
boolean mustExecuteOnMaster) |
protected void |
AbstractMastersListener.setSessionReadOnly(boolean readOnly,
Protocol protocol) |
void |
Listener.switchReadOnlyConnection(Boolean readonly) |
abstract void |
AbstractMastersListener.switchReadOnlyConnection(Boolean readonly) |
void |
Listener.syncConnection(Protocol from,
Protocol to) |
void |
AbstractMastersListener.syncConnection(Protocol from,
Protocol to)
When switching between 2 connections, report existing connection parameter to the new used connection.
|
void |
Listener.throwFailoverMessage(HostAddress failHostAddress,
boolean wasMaster,
QueryException queryException,
boolean reconnected) |
void |
AbstractMastersListener.throwFailoverMessage(HostAddress failHostAddress,
boolean wasMaster,
QueryException queryException,
boolean reconnected)
Throw a human readable message after a failoverException.
|
Constructor and Description |
---|
FailoverProxy(Listener listener,
ReentrantLock lock)
Proxy constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
MastersSlavesListener.checkInitialConnection(QueryException queryException) |
Modifier and Type | Method and Description |
---|---|
protected void |
MastersSlavesListener.checkInitialConnection(QueryException queryException) |
void |
MastersSlavesListener.checkWaitingConnection()
Verify that there is waiting connection that have to replace failing one.
|
void |
MastersFailoverListener.foundActiveMaster(Protocol protocol)
method called when a new Master connection is found after a fallback.
|
void |
MastersSlavesListener.foundActiveSecondary(Protocol newSecondaryProtocol)
Method called when a new secondary connection is found after a fallback.
|
void |
MastersSlavesListener.initializeConnection()
Initialize connections.
|
void |
MastersFailoverListener.initializeConnection()
Connect to database.
|
void |
MastersSlavesListener.lockAndSwitchSecondary(Protocol newSecondaryProtocol)
Use the parameter newSecondaryProtocol as new current secondary connection.
|
void |
MastersSlavesListener.preExecute() |
void |
MastersFailoverListener.preExecute()
Before executing query, reconnect if connection is closed, and autoReconnect option is set.
|
void |
MastersSlavesListener.reconnect()
Reconnect failed connection.
|
void |
MastersFailoverListener.reconnect()
Try to reconnect connection.
|
void |
MastersSlavesListener.reconnectFailedConnection(SearchFilter searchFilter)
Loop to connect.
|
void |
MastersFailoverListener.reconnectFailedConnection(SearchFilter searchFilter)
Loop to connect failed hosts.
|
void |
AuroraListener.reconnectFailedConnection(SearchFilter searchFilter)
Search a valid connection for failed one.
|
void |
MastersSlavesListener.rePrepareOnSlave(ServerPrepareResult oldServerPrepareResult,
boolean mustBeOnMaster) |
void |
AuroraListener.retrieveAllEndpointsAndSet(Protocol protocol)
Retrieves the information necessary to add a new endpoint.
|
void |
MastersSlavesListener.switchReadOnlyConnection(Boolean mustBeReadOnly)
Switch to a read-only(secondary) or read and write connection(master).
|
void |
MastersFailoverListener.switchReadOnlyConnection(Boolean mustBeReadOnly)
Force session to read-only according to options.
|
Modifier and Type | Method and Description |
---|---|
ServerPrepareResult |
ComStmtPrepare.read(ReadPacketFetcher packetFetcher)
Read COM_PREPARE_RESULT.
|
void |
ComStmtPrepare.send(PacketOutputStream writer)
Send directly to socket the sql data.
|
static void |
ComExecute.sendDirect(PacketOutputStream writer,
byte[] sqlBytes)
Send directly to socket the sql data.
|
void |
ComStmtPrepare.sendSubCmd(PacketOutputStream writer)
Send sub-command (COM_MULTI) to write socket.
|
Constructor and Description |
---|
ReadInitialConnectPacket(ReadPacketFetcher packetFetcher)
Read database initial stream.
|
Modifier and Type | Method and Description |
---|---|
void |
SendPamAuthPacket.handleResultPacket(ReadPacketFetcher packetFetcher) |
void |
SendGssApiAuthPacket.handleResultPacket(ReadPacketFetcher packetFetcher) |
void |
InterfaceAuthSwitchSendResponsePacket.handleResultPacket(ReadPacketFetcher packetFetcher) |
void |
AbstractAuthSwitchSendResponsePacket.handleResultPacket(ReadPacketFetcher packetFetcher)
Handle response packet.
|
void |
SendPamAuthPacket.send(OutputStream os)
Send native password stream.
|
void |
SendGssApiAuthPacket.send(OutputStream os)
Send native password stream.
|
void |
InterfaceSendPacket.send(OutputStream os) |
Modifier and Type | Method and Description |
---|---|
void |
WindowsNativeSspiAuthentication.authenticate(PacketOutputStream writer,
String serverPrincipalName,
String mechanisms) |
void |
StandardGssapiAuthentication.authenticate(PacketOutputStream writer,
String serverPrincipalName,
String mechanisms) |
abstract void |
GssapiAuth.authenticate(PacketOutputStream writer,
String serverPrincipalName,
String mechanisms) |
Modifier and Type | Method and Description |
---|---|
QueryException |
AsyncMultiReadResult.getException() |
abstract QueryException |
AbstractMultiSend.handleResultException(QueryException qex,
Results results,
List<ParameterHolder[]> parametersList,
List<String> queries,
int currentCounter,
int sendCmdCounter,
int paramCount,
PrepareResult prepareResult) |
QueryException |
AbstractQueryProtocol.readErrorPacket(Buffer buffer,
Results results)
Read ERR_Packet.
|
Modifier and Type | Method and Description |
---|---|
abstract QueryException |
AbstractMultiSend.handleResultException(QueryException qex,
Results results,
List<ParameterHolder[]> parametersList,
List<String> queries,
int currentCounter,
int sendCmdCounter,
int paramCount,
PrepareResult prepareResult) |
void |
AsyncMultiReadResult.setException(QueryException exception) |
Modifier and Type | Method and Description |
---|---|
void |
Protocol.cancelCurrentQuery() |
void |
AbstractQueryProtocol.cancelCurrentQuery()
Cancels the current query - clones the current protocol and executes a query using the new connection.
|
boolean |
Protocol.checkIfMaster() |
boolean |
AuroraProtocol.checkIfMaster()
Aurora best way to check if a node is a master : is not in read-only mode.
|
boolean |
AbstractConnectProtocol.checkIfMaster() |
protected static void |
AbstractConnectProtocol.close(ReadPacketFetcher fetcher,
PacketOutputStream packetOutputStream,
Socket socket) |
void |
Protocol.connect() |
void |
AbstractConnectProtocol.connect()
Connect to currentHost.
|
void |
Protocol.connectWithoutProxy() |
void |
AbstractConnectProtocol.connectWithoutProxy()
Connect without proxy.
|
protected void |
AbstractConnectProtocol.enabledSslCipherSuites(SSLSocket sslSocket)
Set ssl socket cipher according to options.
|
protected void |
AbstractConnectProtocol.enabledSslProtocolSuites(SSLSocket sslSocket)
Return possible protocols : values of option enabledSslProtocolSuites is set, or default to "TLSv1,TLSv1.1".
|
PrepareResult |
AbstractMultiSend.executeBatch()
Execute Bulk execution (send packets by batch of useBatchMultiSendNumber or when max packet is reached) before reading results.
|
void |
Protocol.executeBatch(boolean mustExecuteOnMaster,
Results results,
List<String> queries) |
void |
AbstractQueryProtocol.executeBatch(boolean mustExecuteOnMaster,
Results results,
List<String> queries)
Execute list of queries not rewritable.
|
void |
Protocol.executeBatchMulti(boolean mustExecuteOnMaster,
Results results,
ClientPrepareResult clientPrepareResult,
List<ParameterHolder[]> parameterList) |
void |
AbstractQueryProtocol.executeBatchMulti(boolean mustExecuteOnMaster,
Results results,
ClientPrepareResult clientPrepareResult,
List<ParameterHolder[]> parametersList)
Execute clientPrepareQuery batch.
|
void |
Protocol.executeBatchMultiple(boolean mustExecuteOnMaster,
Results results,
List<String> queries) |
void |
AbstractQueryProtocol.executeBatchMultiple(boolean mustExecuteOnMaster,
Results results,
List<String> queries)
Execute list of queries.
|
void |
Protocol.executeBatchRewrite(boolean mustExecuteOnMaster,
Results results,
ClientPrepareResult prepareResult,
List<ParameterHolder[]> parameterList,
boolean rewriteValues) |
void |
AbstractQueryProtocol.executeBatchRewrite(boolean mustExecuteOnMaster,
Results results,
ClientPrepareResult prepareResult,
List<ParameterHolder[]> parameterList,
boolean rewriteValues)
Specific execution for batch rewrite that has specific query for memory.
|
void |
Protocol.executePreparedQuery(boolean mustExecuteOnMaster,
ServerPrepareResult serverPrepareResult,
Results results,
ParameterHolder[] parameters) |
void |
AbstractQueryProtocol.executePreparedQuery(boolean mustExecuteOnMaster,
ServerPrepareResult serverPrepareResult,
Results results,
ParameterHolder[] parameters)
Execute a query that is already prepared.
|
void |
Protocol.executeQuery(boolean mustExecuteOnMaster,
Results results,
ClientPrepareResult clientPrepareResult,
ParameterHolder[] parameters) |
void |
AbstractQueryProtocol.executeQuery(boolean mustExecuteOnMaster,
Results results,
ClientPrepareResult clientPrepareResult,
ParameterHolder[] parameters)
Execute a unique clientPrepareQuery.
|
void |
Protocol.executeQuery(boolean mustExecuteOnMaster,
Results results,
String sql) |
void |
AbstractQueryProtocol.executeQuery(boolean mustExecuteOnMaster,
Results results,
String sql)
Execute query directly to outputStream.
|
void |
Protocol.executeQuery(String sql) |
void |
AbstractQueryProtocol.executeQuery(String sql) |
abstract void |
AbstractConnectProtocol.executeQuery(String sql) |
boolean |
Protocol.forceReleasePrepareStatement(int statementId) |
boolean |
AbstractQueryProtocol.forceReleasePrepareStatement(int statementId)
Force release of prepare statement that are not used.
|
void |
Protocol.forceReleaseWaitingPrepareStatement() |
void |
AbstractQueryProtocol.forceReleaseWaitingPrepareStatement()
Force release of prepare statement that are not used.
|
protected static boolean |
MastersSlavesProtocol.foundSecondary(MastersSlavesListener listener,
MastersSlavesProtocol protocol,
SearchFilter searchFilter) |
void |
Protocol.getResult(Results results) |
void |
AbstractQueryProtocol.getResult(Results results) |
abstract QueryException |
AbstractMultiSend.handleResultException(QueryException qex,
Results results,
List<ParameterHolder[]> parametersList,
List<String> queries,
int currentCounter,
int sendCmdCounter,
int paramCount,
PrepareResult prepareResult) |
static void |
AuroraProtocol.loop(AuroraListener listener,
List<HostAddress> addresses,
SearchFilter searchFilter)
loop until found the failed connection.
|
static void |
MasterProtocol.loop(Listener listener,
List<HostAddress> addresses,
SearchFilter searchFilter)
loop until found the failed connection.
|
static void |
MastersSlavesProtocol.loop(MastersSlavesListener listener,
List<HostAddress> addresses,
SearchFilter searchFilter)
loop until found the failed connection.
|
boolean |
Protocol.ping() |
boolean |
AbstractQueryProtocol.ping() |
ServerPrepareResult |
Protocol.prepare(String sql,
boolean executeOnMaster) |
ServerPrepareResult |
AbstractQueryProtocol.prepare(String sql,
boolean executeOnMaster)
Prepare query on server side.
|
ServerPrepareResult |
Protocol.prepareAndExecute(boolean mustExecuteOnMaster,
ServerPrepareResult serverPrepareResult,
Results results,
String sql,
ParameterHolder[] parameters) |
ServerPrepareResult |
AbstractQueryProtocol.prepareAndExecute(boolean mustExecuteOnMaster,
ServerPrepareResult serverPrepareResult,
Results results,
String sql,
ParameterHolder[] parameters)
Execute Prepare if needed, and execute COM_STMT_EXECUTE queries in batch.
|
ServerPrepareResult |
Protocol.prepareAndExecutes(boolean mustExecuteOnMaster,
ServerPrepareResult serverPrepareResult,
Results results,
String sql,
List<ParameterHolder[]> parameterList) |
ServerPrepareResult |
AbstractQueryProtocol.prepareAndExecutes(boolean mustExecuteOnMaster,
ServerPrepareResult serverPrepareResult,
Results results,
String sql,
List<ParameterHolder[]> parametersList)
Execute Prepare if needed, and execute COM_STMT_EXECUTE queries in batch.
|
void |
Protocol.readEofPacket() |
void |
AbstractConnectProtocol.readEofPacket()
Check that next read packet is a End-of-file packet.
|
void |
AbstractQueryProtocol.readLocalInfilePacket(Buffer buffer,
Results results)
Read Local_infile Packet.
|
void |
AbstractQueryProtocol.readOkPacket(Buffer buffer,
Results results)
Read OK_Packet.
|
void |
AbstractQueryProtocol.readPacket(Results results)
Read server response packet.
|
void |
AbstractQueryProtocol.readResultSet(Buffer buffer,
Results results)
Read ResultSet Packet.
|
void |
Protocol.releasePrepareStatement(ServerPrepareResult serverPrepareResult) |
void |
AbstractQueryProtocol.releasePrepareStatement(ServerPrepareResult serverPrepareResult)
Deallocate prepare statement if not used anymore.
|
void |
Protocol.rollback() |
void |
AbstractQueryProtocol.rollback()
Rollback transaction.
|
abstract void |
AbstractMultiSend.sendCmd(PacketOutputStream writer,
Results results,
List<ParameterHolder[]> parametersList,
List<String> queries,
int paramCount,
BulkStatus status,
PrepareResult prepareResult) |
void |
Protocol.setCatalog(String database) |
void |
AbstractQueryProtocol.setCatalog(String database) |
void |
Protocol.setMaxRows(int max) |
void |
AbstractQueryProtocol.setMaxRows(int max) |
void |
Protocol.setReadonly(boolean readOnly) |
void |
Protocol.setTransactionIsolation(int level) |
void |
AbstractQueryProtocol.setTransactionIsolation(int level)
Set transaction isolation.
|
void |
Protocol.skip() |
void |
AbstractConnectProtocol.skip()
Skip packets not read that are not needed.
|
void |
Protocol.skipEofPacket() |
void |
AbstractConnectProtocol.skipEofPacket()
Check that next read packet is a End-of-file packet.
|
Modifier and Type | Method and Description |
---|---|
static InterfaceAuthSwitchSendResponsePacket |
DefaultAuthenticationProvider.processAuthPlugin(ReadPacketFetcher packetFetcher,
String plugin,
String password,
byte[] authData,
int seqNo)
Process AuthenticationSwitch.
|
InterfaceAuthSwitchSendResponsePacket |
AuthenticationProviderHolder.AuthenticationProvider.processAuthPlugin(ReadPacketFetcher packetFetcher,
String plugin,
String password,
byte[] authData,
int seqNo) |
Constructor and Description |
---|
MariaDbX509TrustManager(Options options)
MyX509TrustManager.
|
Modifier and Type | Method and Description |
---|---|
void |
Results.loadFully(boolean skip,
Protocol protocol)
Load fully current results.
|
Modifier and Type | Method and Description |
---|---|
boolean |
MariaSelectResultSet.readNextValue(List<byte[][]> values)
Read next value.
|
Constructor and Description |
---|
MariaSelectResultSet(ColumnInformation[] columnInformation,
Results results,
Protocol protocol,
ReadPacketFetcher fetcher,
boolean callableResult)
Create Streaming resultSet.
|
Modifier and Type | Class and Description |
---|---|
class |
PrepareException |
Modifier and Type | Method and Description |
---|---|
void |
PacketOutputStream.send(String sql,
byte commandType)
Send SQL string to outputStream.
|
void |
PacketOutputStream.sendDirect(byte[] sqlBytes,
int offset,
int sqlLength,
byte commandType)
Send buffer to outputStream.
|
Modifier and Type | Method and Description |
---|---|
static void |
ExceptionMapper.throwAndLogException(QueryException exception,
MariaDbConnection connection,
MariaDbStatement statement,
Logger logger)
Helper to throw exception.
|
static void |
ExceptionMapper.throwException(QueryException exception,
MariaDbConnection connection,
MariaDbStatement statement)
Helper to throw exception.
|
Modifier and Type | Method and Description |
---|---|
static Protocol |
Utils.retrieveProxy(UrlParser urlParser,
ReentrantLock lock)
Retrieve protocol corresponding to the failover options.
|
Modifier and Type | Class and Description |
---|---|
class |
ReconnectDuringTransactionException |
Copyright © 2016. All rights reserved.