|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectheap.Heapfile
Field Summary | |
static int |
ORDINARY
|
static int |
TEMP
|
Fields inherited from interface global.GlobalConst |
INVALID_PAGE, MAX_NAME, MAX_SPACE, MAXATTRNAME, MAXFILENAME, MAXINDEXNAME, MINIBASE_BUFFER_POOL_SIZE, MINIBASE_DB_SIZE, MINIBASE_DEFAULT_SHAREDMEM_SIZE, MINIBASE_MAX_TRANSACTIONS, MINIBASE_MAXARRSIZE, MINIBASE_PAGESIZE, NUMBUF |
Constructor Summary | |
Heapfile(java.lang.String name)
Initialize. |
Method Summary | |
void |
deleteFile()
Delete the file from the database. |
boolean |
deleteRecord(RID rid)
Delete record from file with given rid. |
int |
getRecCnt()
Return number of records in file. |
Tuple |
getRecord(RID rid)
Read record from file, returning pointer and length. |
RID |
insertRecord(byte[] recPtr)
Insert record into file, return its Rid. |
Scan |
openScan()
Initiate a sequential scan. |
boolean |
updateRecord(RID rid,
Tuple newtuple)
Updates the specified record in the heapfile. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int TEMP
public static final int ORDINARY
Constructor Detail |
public Heapfile(java.lang.String name) throws HFException, HFBufMgrException, HFDiskMgrException, java.io.IOException
HFException
- heapfile exception
HFBufMgrException
- exception thrown from bufmgr layer
HFDiskMgrException
- exception thrown from diskmgr layer
java.io.IOException
- I/O errorsMethod Detail |
public int getRecCnt() throws InvalidSlotNumberException, InvalidTupleSizeException, HFDiskMgrException, HFBufMgrException, java.io.IOException
InvalidSlotNumberException
- invalid slot number
InvalidTupleSizeException
- invalid tuple size
HFBufMgrException
- exception thrown from bufmgr layer
HFDiskMgrException
- exception thrown from diskmgr layer
java.io.IOException
- I/O errorspublic RID insertRecord(byte[] recPtr) throws InvalidSlotNumberException, InvalidTupleSizeException, SpaceNotAvailableException, HFException, HFBufMgrException, HFDiskMgrException, java.io.IOException
recPtr
- pointer of the record
InvalidSlotNumberException
- invalid slot number
InvalidTupleSizeException
- invalid tuple size
SpaceNotAvailableException
- no space left
HFException
- heapfile exception
HFBufMgrException
- exception thrown from bufmgr layer
HFDiskMgrException
- exception thrown from diskmgr layer
java.io.IOException
- I/O errorspublic boolean deleteRecord(RID rid) throws InvalidSlotNumberException, InvalidTupleSizeException, HFException, HFBufMgrException, HFDiskMgrException, java.lang.Exception
InvalidSlotNumberException
- invalid slot number
InvalidTupleSizeException
- invalid tuple size
HFException
- heapfile exception
HFBufMgrException
- exception thrown from bufmgr layer
HFDiskMgrException
- exception thrown from diskmgr layer
java.lang.Exception
- other exceptionpublic boolean updateRecord(RID rid, Tuple newtuple) throws InvalidSlotNumberException, InvalidUpdateException, InvalidTupleSizeException, HFException, HFDiskMgrException, HFBufMgrException, java.lang.Exception
InvalidSlotNumberException
- invalid slot number
InvalidUpdateException
- invalid update on record
InvalidTupleSizeException
- invalid tuple size
HFException
- heapfile exception
HFBufMgrException
- exception thrown from bufmgr layer
HFDiskMgrException
- exception thrown from diskmgr layer
java.lang.Exception
- other exceptionpublic Tuple getRecord(RID rid) throws InvalidSlotNumberException, InvalidTupleSizeException, HFException, HFDiskMgrException, HFBufMgrException, java.lang.Exception
rid
- Record ID
InvalidSlotNumberException
- invalid slot number
InvalidTupleSizeException
- invalid tuple size
SpaceNotAvailableException
- no space left
HFException
- heapfile exception
HFBufMgrException
- exception thrown from bufmgr layer
HFDiskMgrException
- exception thrown from diskmgr layer
java.lang.Exception
- other exceptionpublic Scan openScan() throws InvalidTupleSizeException, java.io.IOException
InvalidTupleSizeException
- Invalid tuple size
java.io.IOException
- I/O errorspublic void deleteFile() throws InvalidSlotNumberException, FileAlreadyDeletedException, InvalidTupleSizeException, HFBufMgrException, HFDiskMgrException, java.io.IOException
InvalidSlotNumberException
- invalid slot number
InvalidTupleSizeException
- invalid tuple size
FileAlreadyDeletedException
- file is deleted already
HFBufMgrException
- exception thrown from bufmgr layer
HFDiskMgrException
- exception thrown from diskmgr layer
java.io.IOException
- I/O errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |