simpledb
Interface DbFileIterator


public interface DbFileIterator

DbFileIterator is the iterator interface that all SimpleDB Dbfile should implement.


Method Summary
 void close()
          Closes the iterator.
 boolean hasNext()
           
 Tuple next()
          Gets the next tuple from the operator (typically implementing by reading from a child operator or an access method).
 void open()
          Opens the iterator
 void rewind()
          Resets the iterator to the start.
 

Method Detail

open

void open()
          throws DbException,
                 TransactionAbortedException
Opens the iterator

Throws:
DbException - when there are problems opening/accessing the database.
TransactionAbortedException

hasNext

boolean hasNext()
                throws DbException,
                       TransactionAbortedException
Returns:
true if there are more tuples available.
Throws:
DbException
TransactionAbortedException

next

Tuple next()
           throws DbException,
                  TransactionAbortedException,
                  java.util.NoSuchElementException
Gets the next tuple from the operator (typically implementing by reading from a child operator or an access method).

Returns:
The next tuple in the iterator.
Throws:
java.util.NoSuchElementException - if there are no more tuples
DbException
TransactionAbortedException

rewind

void rewind()
            throws DbException,
                   TransactionAbortedException
Resets the iterator to the start.

Throws:
DbException - When rewind is unsupported.
TransactionAbortedException

close

void close()
Closes the iterator.