## org.h2.store
Class PageLog

    java.lang.Object
      org.h2.store.PageLog

    public class PageLog

extends java.lang.Object

Transaction log mechanism. The stream contains a list of records. The data format for a record is:

- type (0: no-op, 1: undo, 2: commit, ...)
- data

The transaction log is split into sections. A checkpoint starts a new section.

Field Summary
`static int` `ADD` Add a record to a table.
`static int` `CHECKPOINT` Perform a checkpoint.
`static int` `COMMIT` A commit entry of a session.
`static int` `FREE_LOG` Free a log page.
`static int` `NOOP` No operation.
`static int` `PREPARE_COMMIT` A prepare commit entry for a session.
`static int` `REMOVE` Remove a record from a table.
`static int` `ROLLBACK` Roll back a prepared transaction.
`static int` `TRUNCATE` Truncate a table.
`static int` `UNDO` An undo log entry.

Method Summary
`static Row` `readRow(RowFactory rowFactory, DataReader in, Data data)` Read a row from an input stream.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NOOP

    public static final int NOOP

  No operation.

  See Also:
    Constant Field Values

### UNDO

    public static final int UNDO

  An undo log entry. Format: page id: varInt, size, page. Size 0 means uncompressed, size 1 means empty page, otherwise the size is the number of compressed bytes.

  See Also:
    Constant Field Values

### COMMIT

    public static final int COMMIT

  A commit entry of a session. Format: session id: varInt.

  See Also:
    Constant Field Values

### PREPARE_COMMIT

    public static final int PREPARE_COMMIT

  A prepare commit entry for a session. Format: session id: varInt, transaction name: string.

  See Also:
    Constant Field Values

### ROLLBACK

    public static final int ROLLBACK

  Roll back a prepared transaction. Format: session id: varInt.

  See Also:
    Constant Field Values

### ADD

    public static final int ADD

  Add a record to a table. Format: session id: varInt, table id: varInt, row.

  See Also:
    Constant Field Values

### REMOVE

    public static final int REMOVE

  Remove a record from a table. Format: session id: varInt, table id: varInt, row.

  See Also:
    Constant Field Values

### TRUNCATE

    public static final int TRUNCATE

  Truncate a table. Format: session id: varInt, table id: varInt.

  See Also:
    Constant Field Values

### CHECKPOINT

    public static final int CHECKPOINT

  Perform a checkpoint. The log section id is incremented. Format: -

  See Also:
    Constant Field Values

### FREE_LOG

    public static final int FREE_LOG

  Free a log page. Format: count: varInt, page ids: varInt

  See Also:
    Constant Field Values

Method Detail

### readRow

    public static Row readRow(RowFactory rowFactory,
                              DataReader in,
                              Data data)
                       throws java.io.IOException

  Read a row from an input stream.

  Parameters:
    `rowFactory` - the row factory
    `in` - the input stream
    `data` - a temporary buffer
  Returns:
    the row
  Throws:
    `java.io.IOException`