Package org.mariadb.jdbc.client.impl

## Class TransactionSaver

- java.lang.Object
- - org.mariadb.jdbc.client.impl.TransactionSaver

    public class TransactionSaver
    extends Object

Transaction cache Huge command are not cached, cache is limited to configuration transactionReplaySize commands

### Constructor Summary

Constructors
`TransactionSaver​(int transactionReplaySize)` Constructor

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `add​(RedoableClientMessage clientMessage)` Add a command to cache.
`void` `clear()` Transaction finished, clearing cache
`RedoableClientMessage[]` `getBuffers()` cache buffer
`int` `getIdx()` Current transaction cache length
`boolean` `isDirty()` Is cache not valid (some commands have not been cached)

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

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

### Constructor Detail

#### TransactionSaver

    public TransactionSaver​(int transactionReplaySize)

Constructor

Parameters:
  `transactionReplaySize` - maximum number of command cached

### Method Detail

#### add

    public void add​(RedoableClientMessage clientMessage)

Add a command to cache.

Parameters:
  `clientMessage` - client message

#### clear

    public void clear()

Transaction finished, clearing cache

#### getIdx

    public int getIdx()

Current transaction cache length

Returns:
  cache length

#### isDirty

    public boolean isDirty()

Is cache not valid (some commands have not been cached)

Returns:
  is dirty

#### getBuffers

    public RedoableClientMessage[] getBuffers()

cache buffer

Returns:
  cached messages