Class ReplayClient

java.lang.Object
org.mariadb.jdbc.client.impl.StandardClient
org.mariadb.jdbc.client.impl.ReplayClient
All Implemented Interfaces:
AutoCloseable, Client

public class ReplayClient extends StandardClient
Replay client wrapper
  • Field Details

    • logger

      private static final Logger logger
  • Constructor Details

    • ReplayClient

      public ReplayClient(Configuration conf, HostAddress hostAddress, ClosableLock 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 Details

    • sendQuery

      public int sendQuery(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<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 interface 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<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 interface 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