iterator
Class SpoofIbuf

java.lang.Object
  extended byiterator.SpoofIbuf
All Implemented Interfaces:
GlobalConst

public class SpoofIbuf
extends java.lang.Object
implements GlobalConst


Field Summary
 
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
SpoofIbuf()
           
 
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
 

Constructor Detail

SpoofIbuf

public SpoofIbuf()
Method Detail

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 buffer
tSize - the tuple size
fd - the reference to an Heapfile
Ntuples - 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