Interface RedoableClientMessage

    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default int encode​(Writer writer, org.mariadb.jdbc.client.Context context, Prepare newPrepareResult)
      Encode command to packet
      default void ensureReplayable​(org.mariadb.jdbc.client.Context context)
      Ensure that command can be replayed
      default int reEncode​(Writer writer, org.mariadb.jdbc.client.Context context, Prepare newPrepareResult)
      re-encode command to packet
      default void saveParameters()
      Save parameters of command that can be re-executed
      • Methods inherited from interface org.mariadb.jdbc.message.ClientMessage

        batchUpdateLength, binaryProtocol, canSkipMeta, description, encode, readPacket
    • Method Detail

      • saveParameters

        default void saveParameters()
        Save parameters of command that can be re-executed
      • ensureReplayable

        default void ensureReplayable​(org.mariadb.jdbc.client.Context context)
                               throws IOException,
                                      SQLException
        Ensure that command can be replayed
        Parameters:
        context - connection context
        Throws:
        IOException - If socket error occurs
        SQLException - for other type of issue
      • encode

        default int encode​(Writer writer,
                           org.mariadb.jdbc.client.Context context,
                           Prepare newPrepareResult)
                    throws IOException,
                           SQLException
        Encode command to packet
        Parameters:
        writer - socket writer
        context - connection context
        newPrepareResult - new prepare result if prepare has been changed
        Returns:
        number of send command
        Throws:
        IOException - if any socket error is issued
        SQLException - if any other kind of error occurs during encoding
      • reEncode

        default int reEncode​(Writer writer,
                             org.mariadb.jdbc.client.Context context,
                             Prepare newPrepareResult)
                      throws IOException,
                             SQLException
        re-encode command to packet
        Parameters:
        writer - socket writer
        context - connection context
        newPrepareResult - new prepare result if prepare has been changed
        Returns:
        number of send command
        Throws:
        IOException - if any socket error is issued
        SQLException - if any other kind of error occurs during encoding