heap
Class HeapScan

java.lang.Object
  extended by heap.HeapScan
All Implemented Interfaces:
GlobalConst

public class HeapScan
extends java.lang.Object
implements GlobalConst

A HeapScan object is created only through the function openScan() in the HeapFile class. It supports the getNext interface which will simply retrieve the next record in the file.


Field Summary
 
Fields inherited from interface global.GlobalConst
EMPTY_SLOT, FIRST_PAGEID, INVALID_PAGEID, MAX_COLSIZE, MAX_TUPSIZE, NAME_MAXLEN, PAGE_SIZE, PIN_DISKIO, PIN_MEMCPY, UNPIN_CLEAN, UNPIN_DIRTY
 
Method Summary
 void close()
          Closes the file scan, releasing any pinned pages.
 byte[] getNext(RID rid)
          Gets the next record in the file scan.
 boolean hasNext()
          Returns true if there are more records to scan, false otherwise.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

close

public void close()
Closes the file scan, releasing any pinned pages.


hasNext

public boolean hasNext()
Returns true if there are more records to scan, false otherwise.


getNext

public byte[] getNext(RID rid)
Gets the next record in the file scan.

Parameters:
rid - output parameter that identifies the returned record
Throws:
java.lang.IllegalStateException - if the scan has no more elements