simpledb.log
Class BasicLogRecord

java.lang.Object
  extended by simpledb.log.BasicLogRecord

public class BasicLogRecord
extends Object

A class that provides the ability to read the values of a log record. The class has no idea what values are there. Instead, the methods nextInt and nextString read the values sequentially. Thus the client is responsible for knowing how many values are in the log record, and what their types are.

Author:
Edward Sciore

Constructor Summary
BasicLogRecord(Page pg, int pos)
          A log record located at the specified position of the specified page.
 
Method Summary
 int nextInt()
          Returns the next value of the current log record, assuming it is an integer.
 String nextString()
          Returns the next value of the current log record, assuming it is a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicLogRecord

public BasicLogRecord(Page pg,
                      int pos)
A log record located at the specified position of the specified page. This constructor is called exclusively by LogIterator.next().

Parameters:
pg - the page containing the log record
pos - the position of the log record
Method Detail

nextInt

public int nextInt()
Returns the next value of the current log record, assuming it is an integer.

Returns:
the next value of the current log record

nextString

public String nextString()
Returns the next value of the current log record, assuming it is a string.

Returns:
the next value of the current log record


Copyright © 2011. All Rights Reserved.