|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectheap.HeapScan
public class HeapScan
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 |
| Constructor Summary | |
|---|---|
protected |
HeapScan(HeapFile hf)
Constructs a file scan by pinning the directoy header page and initializing iterator fields. |
| Method Summary | |
|---|---|
void |
close()
Closes the file scan, releasing any pinned pages. |
protected void |
finalize()
Called by the garbage collector when there are no more references to the object; closes the scan if it's still open. |
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 |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected HeapScan(HeapFile hf)
| Method Detail |
|---|
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void close()
public boolean hasNext()
public byte[] getNext(RID rid)
rid - output parameter that identifies the returned record
java.lang.IllegalStateException - if the scan has no more elements
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||