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`, `org.mariadb.jdbc.client.Client`

    public class ReplayClient
    extends StandardClient

Replay client wrapper

### Field Summary

### Fields inherited from class org.mariadb.jdbc.client.impl.StandardClient

`context, exceptionFactory, writer`

### Constructor Summary

Constructors
`ReplayClient​(Configuration conf, HostAddress hostAddress, ReentrantLock lock, boolean skipPostCommands)` Constructor

### Method Summary

All Methods Instance Methods Concrete Methods
`List<org.mariadb.jdbc.client.Completion>` `execute​(org.mariadb.jdbc.message.ClientMessage message, Statement stmt, int fetchSize, long maxRows, int resultSetConcurrency, int resultSetType, boolean closeOnCompletion, boolean canRedo)` Send client message and read result
`List<org.mariadb.jdbc.client.Completion>` `executePipeline​(org.mariadb.jdbc.message.ClientMessage[] messages, Statement stmt, int fetchSize, long maxRows, int resultSetConcurrency, int resultSetType, boolean closeOnCompletion, boolean canRedo)` Send client messages pipelining and read result
`int` `sendQuery​(org.mariadb.jdbc.message.ClientMessage message)` Send client message to server
`void` `transactionReplay​(TransactionSaver transactionSaver)` Replay transaction, re-prepare server command if needed

### Methods inherited from class org.mariadb.jdbc.client.impl.StandardClient

`abort, checkNotClosed, close, closePrepare, createSessionVariableQuery, destroySocket, execute, execute, getContext, getExceptionFactory, getHostAddress, getSocketTimeout, isClosed, isPrimary, readPacket, readPacket, readResponse, readResponse, readStreamingResults, reset, setReadOnly, setSocketTimeout`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ReplayClient

    public ReplayClient​(Configuration conf,
                        HostAddress hostAddress,
                        ReentrantLock lock,
                        boolean skipPostCommands)
                 throws SQLException

Constructor

Parameters:
  `conf` - configuration
  `hostAddress` - host
  `lock` - thread lock object
  `skipPostCommands` - must skip connection post commands
Throws:
  `SQLException` - if connection fails

### Method Detail

#### sendQuery

    public int sendQuery​(org.mariadb.jdbc.message.ClientMessage message)
                  throws SQLException

Description copied from class: `StandardClient`
Send client message to server

Overrides:
  `sendQuery` in class `StandardClient`
Parameters:
  `message` - client message
Returns:
  number of command send
Throws:
  `SQLException` - if socket error occurs

#### executePipeline

    public List<org.mariadb.jdbc.client.Completion> executePipeline​(org.mariadb.jdbc.message.ClientMessage[] messages,
                                                                    Statement stmt,
                                                                    int fetchSize,
                                                                    long maxRows,
                                                                    int resultSetConcurrency,
                                                                    int resultSetType,
                                                                    boolean closeOnCompletion,
                                                                    boolean canRedo)
                                                             throws SQLException

Description copied from interface: `org.mariadb.jdbc.client.Client`
Send client messages pipelining and read result

Specified by:
  `executePipeline` in interface `org.mariadb.jdbc.client.Client`
Overrides:
  `executePipeline` in class `StandardClient`
Parameters:
  `messages` - client message
  `stmt` - statement
  `fetchSize` - fetch size
  `maxRows` - maximum number of rows. 0 = all
  `resultSetConcurrency` - concurrency
  `resultSetType` - result-set type
  `closeOnCompletion` - close statement on completion
  `canRedo` - can client message be redone in case of failover
Returns:
  results
Throws:
  `SQLException` - if any error occurs

#### execute

    public List<org.mariadb.jdbc.client.Completion> execute​(org.mariadb.jdbc.message.ClientMessage message,
                                                            Statement stmt,
                                                            int fetchSize,
                                                            long maxRows,
                                                            int resultSetConcurrency,
                                                            int resultSetType,
                                                            boolean closeOnCompletion,
                                                            boolean canRedo)
                                                     throws SQLException

Description copied from interface: `org.mariadb.jdbc.client.Client`
Send client message and read result

Specified by:
  `execute` in interface `org.mariadb.jdbc.client.Client`
Overrides:
  `execute` in class `StandardClient`
Parameters:
  `message` - client message
  `stmt` - statement
  `fetchSize` - fetch size
  `maxRows` - maximum number of rows. 0 = all
  `resultSetConcurrency` - concurrency
  `resultSetType` - result-set type
  `closeOnCompletion` - close statement on completion
  `canRedo` - can client message be redone in case of failover
Returns:
  results
Throws:
  `SQLException` - if any error occurs

#### transactionReplay

    public void transactionReplay​(TransactionSaver transactionSaver)
                           throws SQLException

Replay transaction, re-prepare server command if needed

Parameters:
  `transactionSaver` - transaction cache
Throws:
  `SQLException` - if any error occurs