org.h2.log
Class UndoLog

java.lang.Object
  extended by org.h2.log.UndoLog

public class UndoLog
extends java.lang.Object

Each session keeps a undo log if rollback is required.


Constructor Summary
UndoLog(Session session)
          Create a new undo log for the given session.
 
Method Summary
 void add(UndoLogRecord entry)
          Append an undo log entry to the log.
 void clear()
          Clear the undo log.
 UndoLogRecord getLast()
          Get the last record and remove it from the list of operations.
 void removeLast(boolean trimToSize)
          Remove the last record from the list of operations.
 int size()
          Get the number of active rows in this undo log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UndoLog

public UndoLog(Session session)
Create a new undo log for the given session.

Parameters:
session - the session
Method Detail

size

public int size()
Get the number of active rows in this undo log.

Returns:
the number of rows

clear

public void clear()
Clear the undo log. This method is called after the transaction is committed.


getLast

public UndoLogRecord getLast()
                      throws java.sql.SQLException
Get the last record and remove it from the list of operations.

Returns:
the last record
Throws:
java.sql.SQLException

removeLast

public void removeLast(boolean trimToSize)
Remove the last record from the list of operations.

Parameters:
trimToSize - if the undo array should shrink to conserve memory

add

public void add(UndoLogRecord entry)
         throws java.sql.SQLException
Append an undo log entry to the log.

Parameters:
entry - the entry
Throws:
java.sql.SQLException