btree
Class BTFileScan

java.lang.Object
  extended byindex.IndexFileScan
      extended bybtree.BTFileScan
All Implemented Interfaces:
GlobalConst

public class BTFileScan
extends IndexFileScan
implements GlobalConst

BTFileScan implements a search/iterate interface to B+ tree index files (class BTreeFile). It derives from abstract base class IndexFileScan.


Field Summary
 
Fields inherited from interface global.GlobalConst
INVALID_PAGE, MAX_NAME, MAXATTRNAME, MAXFILENAME, MAXINDEXNAME, MINIBASE_BUFFER_POOL_SIZE, MINIBASE_DB_SIZE, MINIBASE_DEFAULT_SHAREDMEM_SIZE, MINIBASE_MAX_TRANSACTIONS, MINIBASE_MAXARRSIZE, NUMBUF, PAGE_SIZE, PAGESIZE
 
Constructor Summary
BTFileScan()
           
 
Method Summary
 void delete_current()
          Delete currently-being-scanned(i.e., just scanned) data entry.
 void destroyBTreeFileScan()
          destructor.
 KeyEntry get_next()
          Iterate once (during a scan).
 int keysize()
          max size of the key
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BTFileScan

public BTFileScan()
Method Detail

get_next

public KeyEntry get_next()
                  throws ScanIteratorException
Iterate once (during a scan).

Specified by:
get_next in class IndexFileScan
Returns:
null if done; otherwise next KeyDataEntry
Throws:
ScanIteratorException - iterator error

delete_current

public void delete_current()
                    throws ScanDeleteException
Delete currently-being-scanned(i.e., just scanned) data entry.

Specified by:
delete_current in class IndexFileScan
Throws:
ScanDeleteException - delete error when scan

keysize

public int keysize()
max size of the key

Specified by:
keysize in class IndexFileScan
Returns:
the maxumum size of the key in BTFile

destroyBTreeFileScan

public void destroyBTreeFileScan()
                          throws java.io.IOException,
                                 InvalidFrameNumberException,
                                 ReplacerException,
                                 PageUnpinnedException,
                                 HashEntryNotFoundException
destructor. unpin some pages if they are not unpinned already. and do some clearing work.

Throws:
java.io.IOException - error from the lower layer
InvalidFrameNumberException - error from the lower layer
ReplacerException - error from the lower layer
PageUnpinnedException - error from the lower layer
HashEntryNotFoundException - error from the lower layer