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 |
---|---|
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) |
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)
Procy 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.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.
|
Constructor and Description |
---|
ReadInitialConnectPacket(ReadPacketFetcher packetFetcher)
Read database initial stream.
|
Modifier and Type | Method and Description |
---|---|
void |
SendTextQueryPacket.send(OutputStream stream)
Send queries to server.
|
void |
InterfaceSendPacket.send(OutputStream os) |
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.closePreparedStatement(int statementId) |
void |
AbstractQueryProtocol.closePreparedStatement(int statementId) |
void |
Protocol.connect() |
void |
AbstractConnectProtocol.connect()
Connect to currentHost.
|
void |
Protocol.connectWithoutProxy() |
void |
AbstractConnectProtocol.connectWithoutProxy()
Connect without proxy.
|
void |
Protocol.executeMultiQueries(Deque<Query> queries,
ExecutionResult executionResult,
int fetchSize,
boolean isRewritable,
int rewriteOffset) |
void |
AbstractQueryProtocol.executeMultiQueries(Deque<Query> queries,
ExecutionResult executionResult,
int resultSetScrollType,
boolean isRewritable,
int rewriteOffset)
Execute list of queries.
|
void |
Protocol.executePreparedQuery(String sql,
ExecutionResult executionResult,
ParameterHolder[] parameters,
PrepareResult prepareResult,
MariaDbType[] parameterTypeHeader,
int resultSetScrollType) |
void |
AbstractQueryProtocol.executePreparedQuery(String sql,
ExecutionResult executionResult,
ParameterHolder[] parameters,
PrepareResult prepareResult,
MariaDbType[] parameterTypeHeader,
int resultSetScrollType) |
void |
Protocol.executePreparedQueryAfterFailover(String sql,
ExecutionResult executionResult,
ParameterHolder[] parameters,
PrepareResult prepareResult,
MariaDbType[] parameterTypeHeader,
int resultSetScrollType) |
void |
AbstractQueryProtocol.executePreparedQueryAfterFailover(String sql,
ExecutionResult executionResult,
ParameterHolder[] parameters,
PrepareResult prepareResult,
MariaDbType[] parameterTypeHeader,
int resultSetScrollType) |
void |
Protocol.executeQueries(Deque<Query> queries,
ExecutionResult executionResult,
int resultSetScrollType) |
void |
AbstractQueryProtocol.executeQueries(Deque<Query> queries,
ExecutionResult executionResult,
int resultSetScrollType)
Execute list of queries one by one
This method is used when using text batch statement and using rewriting (allowMultiQueries || rewriteBatchedStatements).
|
ExecutionResult |
Protocol.executeQuery(Query query) |
ExecutionResult |
AbstractQueryProtocol.executeQuery(Query query)
Execute query.
|
abstract ExecutionResult |
AbstractConnectProtocol.executeQuery(Query query) |
void |
Protocol.executeQuery(Query query,
ExecutionResult executionResult,
int resultSetScrollType,
int fetchSize) |
void |
AbstractQueryProtocol.executeQuery(Query query,
ExecutionResult executionResult,
int resultSetScrollType,
int fetchSize)
Execute Query.
|
void |
Protocol.forceReleasePrepareStatement(int statementId) |
void |
AbstractQueryProtocol.forceReleasePrepareStatement(int statementId)
Force release of prepare statement that are not used.
|
protected static boolean |
MastersSlavesProtocol.foundSecondary(MastersSlavesListener listener,
MastersSlavesProtocol protocol,
SearchFilter searchFilter) |
void |
Protocol.getMoreResults(ExecutionResult executionResult) |
void |
AbstractQueryProtocol.getMoreResults(ExecutionResult executionResult) |
abstract void |
AbstractConnectProtocol.getMoreResults(ExecutionResult executionResult) |
void |
Protocol.getResult(ExecutionResult executionResult,
int resultSetScrollType,
boolean binaryProtocol) |
void |
AbstractQueryProtocol.getResult(ExecutionResult executionResult,
int resultSetScrollType,
boolean binaryProtocol)
Fetch result.
|
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() |
PrepareResult |
Protocol.prepare(String sql) |
PrepareResult |
AbstractQueryProtocol.prepare(String sql) |
void |
AbstractConnectProtocol.readEofPacket()
Check that next read packet is a End-of-file packet.
|
void |
Protocol.releasePrepareStatement(String sql,
int statementId) |
void |
AbstractQueryProtocol.releasePrepareStatement(String sql,
int statementId) |
static void |
AuroraProtocol.searchProbableMaster(AuroraListener listener,
HostAddress probableMaster,
SearchFilter searchFilter)
Connect aurora probable master.
|
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.
|
Modifier and Type | Method and Description |
---|---|
void |
Query.validate() |
void |
MariaDbQuery.validate() |
void |
MariaDbClientParameterizeQuery.validate()
Validate that all parameters are set.
|
Modifier and Type | Class and Description |
---|---|
class |
NoSuchColumnException |
Modifier and Type | Method and Description |
---|---|
static MariaSelectResultSet |
MariaSelectResultSet.createResult(Statement statement,
ResultSetPacket packet,
ReadPacketFetcher packetFetcher,
Protocol protocol,
boolean binaryProtocol,
int resultSetScrollType,
int fetchSize,
boolean canBeCallableResult)
Create streaming resultset.
|
void |
MariaSelectResultSet.initFetch()
Initialize and fetch first value.
|
boolean |
MariaSelectResultSet.readNextValue(List<ValueObject[]> values)
Read next value.
|
Modifier and Type | Method and Description |
---|---|
static SQLException |
ExceptionMapper.createException(QueryException exception,
MariaDbConnection connection,
Statement statement)
Helper to create exception from queryException.
|
static void |
ExceptionMapper.throwException(QueryException exception,
MariaDbConnection connection,
Statement statement)
Helper to throw exception.
|
Modifier and Type | Method and Description |
---|---|
static Protocol |
Utils.retrieveProxy(UrlParser urlParser,
ReentrantLock lock)
Retreive protocol corresponding to the failover options.
|
Modifier and Type | Class and Description |
---|---|
class |
ReconnectDuringTransactionException |
Copyright © 2016. All rights reserved.