Package org.mariadb.jdbc.message.client

## Interface RedoableWithPrepareClientMessage

All Superinterfaces:
  `org.mariadb.jdbc.message.ClientMessage`, `RedoableClientMessage`

All Known Implementing Classes:
  `BulkExecutePacket`, `ExecutePacket`

    public interface RedoableWithPrepareClientMessage
    extends RedoableClientMessage

Client message that can be replayed with parameter

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`default int` `encode​(Writer writer, org.mariadb.jdbc.client.Context context)` Default encoder caller
`int` `encode​(Writer writer, org.mariadb.jdbc.client.Context context, Prepare newPrepareResult)` encoder method in case of failover, passing new prepared object
`String` `getCommand()` sql command value
`ServerPreparedStatement` `prep()` Server prepare statement caller
`default int` `reEncode​(Writer writer, org.mariadb.jdbc.client.Context context, Prepare newPrepareResult)` re-encoder method in case of failover, passing new prepared object
`default void` `rePrepare​(org.mariadb.jdbc.client.Client client)` Force re-prepare command
`void` `setPrepareResult​(PrepareResultPacket prepareResult)` Set prepare result, if pipelining prepare

### Methods inherited from interface org.mariadb.jdbc.message.ClientMessage

`batchUpdateLength, binaryProtocol, canSkipMeta, description, readPacket`

### Methods inherited from interface org.mariadb.jdbc.message.client.RedoableClientMessage

`ensureReplayable, saveParameters`

### Method Detail

#### getCommand

    String getCommand()

sql command value

Returns:
  sql command

#### prep

    ServerPreparedStatement prep()

Server prepare statement caller

Returns:
  caller

#### encode

    default int encode​(Writer writer,
                       org.mariadb.jdbc.client.Context context)
                throws IOException,
                       SQLException

Default encoder caller

Specified by:
  `encode` in interface `org.mariadb.jdbc.message.ClientMessage`
Parameters:
  `writer` - socket writer
  `context` - connection context
Returns:
  number of command sent
Throws:
  `IOException` - if a socket exception occurs
  `SQLException` - for any other kind of error

#### encode

    int encode​(Writer writer,
               org.mariadb.jdbc.client.Context context,
               Prepare newPrepareResult)
        throws IOException,
               SQLException

encoder method in case of failover, passing new prepared object

Specified by:
  `encode` in interface `RedoableClientMessage`
Parameters:
  `writer` - socket writer
  `context` - connection context
  `newPrepareResult` - new prepare result
Returns:
  number of command sent
Throws:
  `IOException` - if a socket exception occurs
  `SQLException` - for any other kind of error

#### reEncode

    default int reEncode​(Writer writer,
                         org.mariadb.jdbc.client.Context context,
                         Prepare newPrepareResult)
                  throws IOException,
                         SQLException

re-encoder method in case of failover, passing new prepared object

Specified by:
  `reEncode` in interface `RedoableClientMessage`
Parameters:
  `writer` - socket writer
  `context` - connection context
  `newPrepareResult` - new prepare result
Returns:
  number of command sent
Throws:
  `IOException` - if a socket exception occurs
  `SQLException` - for any other kind of error

#### setPrepareResult

    void setPrepareResult​(PrepareResultPacket prepareResult)

Set prepare result, if pipelining prepare

Parameters:
  `prepareResult` - prepare results

#### rePrepare

    default void rePrepare​(org.mariadb.jdbc.client.Client client)
                    throws SQLException

Force re-prepare command

Parameters:
  `client` - client
Throws:
  `SQLException` - if any error occurs