Package org.mariadb.jdbc.client.impl
Class ReplayClient
java.lang.Object
org.mariadb.jdbc.client.impl.StandardClient
org.mariadb.jdbc.client.impl.ReplayClient
- All Implemented Interfaces:
AutoCloseable
,Client
Replay client wrapper
-
Field Summary
FieldsFields inherited from class org.mariadb.jdbc.client.impl.StandardClient
context, exceptionFactory, writer
-
Constructor Summary
ConstructorsConstructorDescriptionReplayClient
(Configuration conf, HostAddress hostAddress, ClosableLock lock, boolean skipPostCommands) Constructor -
Method Summary
Modifier and TypeMethodDescriptionexecute
(ClientMessage message, Statement stmt, int fetchSize, long maxRows, int resultSetConcurrency, int resultSetType, boolean closeOnCompletion, boolean canRedo) Send client message and read resultexecutePipeline
(ClientMessage[] messages, Statement stmt, int fetchSize, long maxRows, int resultSetConcurrency, int resultSetType, boolean closeOnCompletion, boolean canRedo) Send client messages pipelining and read resultint
sendQuery
(ClientMessage message) Send client message to servervoid
transactionReplay
(TransactionSaver transactionSaver) Replay transaction, re-prepare server command if neededMethods inherited from class org.mariadb.jdbc.client.impl.StandardClient
abort, authenticationHandler, checkNotClosed, close, closePrepare, createSessionVariableQuery, destroySocket, execute, execute, getContext, getExceptionFactory, getHostAddress, getSocketIp, getSocketTimeout, isClosed, isPrimary, readPacket, readPacket, readResponse, readResponse, readStreamingResults, redirect, reset, setReadOnly, setSocketTimeout, sslWrapper
-
Field Details
-
logger
-
-
Constructor Details
-
ReplayClient
public ReplayClient(Configuration conf, HostAddress hostAddress, ClosableLock lock, boolean skipPostCommands) throws SQLException Constructor- Parameters:
conf
- configurationhostAddress
- hostlock
- thread lock objectskipPostCommands
- must skip connection post commands- Throws:
SQLException
- if connection fails
-
-
Method Details
-
sendQuery
Description copied from class:StandardClient
Send client message to server- Overrides:
sendQuery
in classStandardClient
- Parameters:
message
- client message- Returns:
- number of command send
- Throws:
SQLException
- if socket error occurs
-
executePipeline
public List<Completion> executePipeline(ClientMessage[] messages, Statement stmt, int fetchSize, long maxRows, int resultSetConcurrency, int resultSetType, boolean closeOnCompletion, boolean canRedo) throws SQLException Description copied from interface:Client
Send client messages pipelining and read result- Specified by:
executePipeline
in interfaceClient
- Overrides:
executePipeline
in classStandardClient
- Parameters:
messages
- client messagestmt
- statementfetchSize
- fetch sizemaxRows
- maximum number of rows. 0 = allresultSetConcurrency
- concurrencyresultSetType
- result-set typecloseOnCompletion
- close statement on completioncanRedo
- can client message be redone in case of failover- Returns:
- results
- Throws:
SQLException
- if any error occurs
-
execute
public List<Completion> execute(ClientMessage message, Statement stmt, int fetchSize, long maxRows, int resultSetConcurrency, int resultSetType, boolean closeOnCompletion, boolean canRedo) throws SQLException Description copied from interface:Client
Send client message and read result- Specified by:
execute
in interfaceClient
- Overrides:
execute
in classStandardClient
- Parameters:
message
- client messagestmt
- statementfetchSize
- fetch sizemaxRows
- maximum number of rows. 0 = allresultSetConcurrency
- concurrencyresultSetType
- result-set typecloseOnCompletion
- close statement on completioncanRedo
- can client message be redone in case of failover- Returns:
- results
- Throws:
SQLException
- if any error occurs
-
transactionReplay
Replay transaction, re-prepare server command if needed- Parameters:
transactionSaver
- transaction cache- Throws:
SQLException
- if any error occurs
-