index
Class IndexFile

java.lang.Object
  extended byindex.IndexFile
Direct Known Subclasses:
BTreeFile

public abstract class IndexFile
extends java.lang.Object

Base class for a index file


Constructor Summary
IndexFile()
           
 
Method Summary
abstract  boolean delete(Key data, RID rid)
          Delete entry from the index file.
abstract  void insert(Key data, RID rid)
          Insert entry into the index file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexFile

public IndexFile()
Method Detail

insert

public abstract void insert(Key data,
                            RID rid)
                     throws KeyTooLongException,
                            KeyNotMatchException,
                            LeafInsertRecException,
                            IndexInsertRecException,
                            ConstructPageException,
                            UnpinPageException,
                            PinPageException,
                            NodeNotMatchException,
                            ConvertException,
                            DeleteRecException,
                            IndexSearchException,
                            IteratorException,
                            LeafDeleteException,
                            InsertException,
                            java.io.IOException
Insert entry into the index file.

Parameters:
data - the key for the entry
rid - the rid of the tuple with the key
Throws:
java.io.IOException - from lower layers
KeyTooLongException - the key is too long
KeyNotMatchException - the keys do not match
LeafInsertRecException - insert record to leaf page failed
IndexInsertRecException - insert record to index page failed
ConstructPageException - fail to construct a header page
UnpinPageException - unpin page failed
PinPageException - pin page failed
NodeNotMatchException - nodes do not match
ConvertException - conversion failed (from global package)
DeleteRecException - delete record failed
IndexSearchException - index search failed
IteratorException - error from iterator
LeafDeleteException - delete leaf page failed
InsertException - insert record failed

delete

public abstract boolean delete(Key data,
                               RID rid)
                        throws DeleteFashionException,
                               LeafRedistributeException,
                               RedistributeException,
                               InsertRecException,
                               KeyNotMatchException,
                               UnpinPageException,
                               IndexInsertRecException,
                               FreePageException,
                               RecordNotFoundException,
                               PinPageException,
                               IndexFullDeleteException,
                               LeafDeleteException,
                               IteratorException,
                               ConstructPageException,
                               DeleteRecException,
                               IndexSearchException,
                               java.io.IOException
Delete entry from the index file.

Parameters:
data - the key for the entry
rid - the rid of the tuple with the key
Throws:
java.io.IOException - from lower layers
DeleteFashionException - delete fashion undefined
LeafRedistributeException - failed to redistribute leaf page
RedistributeException - redistrubtion failed
InsertRecException - insert record failed
KeyNotMatchException - keys do not match
UnpinPageException - unpin page failed
IndexInsertRecException - insert record to index failed
FreePageException - free page failed
RecordNotFoundException - failed to find the record
PinPageException - pin page failed
IndexFullDeleteException - full delete on index page failed
LeafDeleteException - delete leaf page failed
IteratorException - exception from iterating through records
ConstructPageException - fail to construct the header page
DeleteRecException - delete record failed
IndexSearchException - index search failed