Class ReplayClient

  • All Implemented Interfaces:
    AutoCloseable, org.mariadb.jdbc.client.Client

    public class ReplayClient
    extends StandardClient
    Replay client wrapper
    • 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