|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DbFile
The interface for database files on disk . Database files need to be able to fetch pages and iterate through tuples. They may also support sargable predictes for efficient index searches. DbFile's are generally access through the buffer pool (rather than directly by operators.)
Method Summary | |
---|---|
java.util.ArrayList<Page> |
addTuple(TransactionId tid,
Tuple t)
Adds the specified tuple to the file on behalf of transaction. |
Page |
deleteTuple(TransactionId tid,
Tuple t)
Removes the specifed tuple from the file on behalf of the specified transaction. |
int |
id()
|
DbFileIterator |
iterator(TransactionId tid)
|
Page |
readPage(PageId id)
Read the specified page from disk. |
void |
writePage(Page p)
Push the specified page to disk. |
Method Detail |
---|
Page readPage(PageId id) throws java.util.NoSuchElementException
java.util.NoSuchElementException
- if the page does not exist in this filevoid writePage(Page p) throws java.io.IOException
java.io.IOException
- if the write failsjava.util.ArrayList<Page> addTuple(TransactionId tid, Tuple t) throws DbException, java.io.IOException, TransactionAbortedException
tid
- The transaction performing the updatet
- The tuple to add. This tuple will be updated to reflect that
it is now stored in this file.
DbException
- if the tuple cannot be added
java.io.IOException
- if the needed file can't be read/written
TransactionAbortedException
Page deleteTuple(TransactionId tid, Tuple t) throws DbException, TransactionAbortedException
DbException
- if the tuple cannot be deleted or is not a member
of the file
TransactionAbortedException
DbFileIterator iterator(TransactionId tid)
int id()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |