UndoLog
Each session keeps a undo log if rollback is required.
| Methods |
|
UndoLog(Session session)
Create a new undo log for the given session.
|
|
UndoLog(Session session)
Create a new undo log for the given session.
Parameters:
session - the session
|
| void |
add(UndoLogRecord entry)
Append an undo log entry to the log.
|
| void |
add(UndoLogRecord entry)
Append an undo log entry to the log.
Parameters:
entry - the entry
|
| void |
clear()
Clear the undo log.
|
| void |
clear()
Clear the undo log. This method is called after the transaction is
committed.
|
| UndoLogRecord |
getLast()
Get the last record and remove it from the list of operations.
|
| UndoLogRecord |
getLast()
Get the last record and remove it from the list of operations.
Returns:
the last record
|
| Table |
getTable(int id)
Get the table for this id.
|
| Table |
getTable(int id)
Get the table for this id. The table must be registered for this undo log
first by calling getTableId.
Parameters:
id - the table id
Returns:
the table object
|
| int |
getTableId(Table table)
Get the table id for this undo log.
|
| int |
getTableId(Table table)
Get the table id for this undo log. If the table is not registered yet,
this is done as well.
Parameters:
table - the table
Returns:
the id
|
| void |
removeLast(boolean trimToSize)
Remove the last record from the list of operations.
|
| void |
removeLast(boolean trimToSize)
Remove the last record from the list of operations.
Parameters:
trimToSize - if the undo array should shrink to conserve memory
|
| void |
seek(long filePos)
Go to the right position in the file.
|
| void |
seek(long filePos)
Go to the right position in the file.
Parameters:
filePos - the position in the file
|
| int |
size()
Get the number of active rows in this undo log.
|
| int |
size()
Get the number of active rows in this undo log.
Returns:
the number of rows
|