simpledb.tx.recovery
Interface LogRecord


public interface LogRecord

The interface implemented by each type of log record.

Author:
Edward Sciore

Field Summary
static int CHECKPOINT
          The six different types of log record
static int COMMIT
          The six different types of log record
static LogMgr logMgr
           
static int ROLLBACK
          The six different types of log record
static int SETINT
          The six different types of log record
static int SETSTRING
          The six different types of log record
static int START
          The six different types of log record
 
Method Summary
 int op()
          Returns the log record's type.
 int txNumber()
          Returns the transaction id stored with the log record.
 void undo(int txnum)
          Undoes the operation encoded by this log record.
 int writeToLog()
          Writes the record to the log and returns its LSN.
 

Field Detail

CHECKPOINT

static final int CHECKPOINT
The six different types of log record

See Also:
Constant Field Values

START

static final int START
The six different types of log record

See Also:
Constant Field Values

COMMIT

static final int COMMIT
The six different types of log record

See Also:
Constant Field Values

ROLLBACK

static final int ROLLBACK
The six different types of log record

See Also:
Constant Field Values

SETINT

static final int SETINT
The six different types of log record

See Also:
Constant Field Values

SETSTRING

static final int SETSTRING
The six different types of log record

See Also:
Constant Field Values

logMgr

static final LogMgr logMgr
Method Detail

writeToLog

int writeToLog()
Writes the record to the log and returns its LSN.

Returns:
the LSN of the record in the log

op

int op()
Returns the log record's type.

Returns:
the log record's type

txNumber

int txNumber()
Returns the transaction id stored with the log record.

Returns:
the log record's transaction id

undo

void undo(int txnum)
Undoes the operation encoded by this log record. The only log record types for which this method does anything interesting are SETINT and SETSTRING.

Parameters:
txnum - the id of the transaction that is performing the undo.


Copyright © 2011. All Rights Reserved.