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 Constructor Description TransactionSaver(int transactionReplaySize)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(RedoableClientMessage clientMessage)Add a command to cache.voidclear()Transaction finished, clearing cacheRedoableClientMessage[]getBuffers()cache bufferintgetIdx()Current transaction cache lengthbooleanisDirty()Is cache not valid (some commands have not been 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
-
-