iterator
Class SpoofIbuf
java.lang.Object
iterator.SpoofIbuf
- All Implemented Interfaces:
- GlobalConst
- public class SpoofIbuf
- extends java.lang.Object
- implements GlobalConst
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 |
Method Summary |
boolean |
empty()
|
Tuple |
Get(Tuple buf)
get a tuple from current buffer,pass reference buf to this method
usage:temp_tuple = tuple.Get(buf); |
void |
init(Heapfile fd,
byte[][] bufs,
int n_pages,
int tSize,
int Ntuples)
Initialize some necessary inormation, call Iobuf to create the
object, and call init to finish intantiation |
void |
SpoofIbuf()
constructor, use the init to initialize |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SpoofIbuf
public SpoofIbuf()
SpoofIbuf
public void SpoofIbuf()
- constructor, use the init to initialize
init
public void init(Heapfile fd,
byte[][] bufs,
int n_pages,
int tSize,
int Ntuples)
throws java.io.IOException,
java.lang.Exception
- Initialize some necessary inormation, call Iobuf to create the
object, and call init to finish intantiation
- Parameters:
n_pages
- the numbers of page of this buffertSize
- the tuple sizefd
- the reference to an HeapfileNtuples
- the tuple numbers of the page
- Throws:
java.io.IOException
- some I/O fault
java.lang.Exception
- other exceptions
Get
public Tuple Get(Tuple buf)
throws java.io.IOException,
java.lang.Exception
- get a tuple from current buffer,pass reference buf to this method
usage:temp_tuple = tuple.Get(buf);
- Parameters:
buf
- write the result to buf
- Returns:
- the result tuple
- Throws:
java.io.IOException
- some I/O fault
java.lang.Exception
- other exceptions
empty
public boolean empty()
- Returns:
- if the buffer is empty,return true. otherwise false