|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectindex.HashIndex
public class HashIndex
| 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 | |
|---|---|
HashIndex(java.lang.String fileName)
Opens an index file given its name, or creates a new index file if the name doesn't exist; a null name produces a temporary index file which requires no disk manager entry. |
|
| Method Summary | |
|---|---|
void |
deleteEntry(SearchKey key,
RID rid)
Deletes the specified entry from the index file. |
void |
deleteFile()
Deletes the index file from the database, freeing all of its pages. |
void |
insertEntry(SearchKey key,
RID rid)
Inserts a new entry into the index file. |
BucketScan |
openScan()
Initiates a scan of the entire index file in bucket order. |
HashScan |
openScan(SearchKey key)
Initiates an equality scan of the index file. |
void |
printSummary()
Prints a high-level view of the directory, namely which buckets are allocated and how many entries are stored in each one. |
java.lang.String |
toString()
Returns the name of the index file. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public HashIndex(java.lang.String fileName)
| Method Detail |
|---|
public void deleteFile()
public void insertEntry(SearchKey key,
RID rid)
java.lang.IllegalArgumentException - if the entry is too large
public void deleteEntry(SearchKey key,
RID rid)
java.lang.IllegalArgumentException - if the entry doesn't existpublic BucketScan openScan()
public HashScan openScan(SearchKey key)
public java.lang.String toString()
toString in class java.lang.Objectpublic void printSummary()
IX_Customers ------------ 0000000 : 35 0000001 : 39 0000010 : 27 ... 1111111 : 42 ------------ Total : 1500
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||