|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectiterator.IoBuf
| Field Summary | |
static int |
READ_BUFFER
|
static int |
WRITE_BUFFER
|
| 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 | |
IoBuf()
|
|
| Method Summary | |
long |
flush()
returns the numbers of tuples written |
Tuple |
Get(Tuple buf)
get a tuple from current buffer,pass reference buf to this method usage:temp_tuple = tuple.Get(buf); |
void |
init(byte[][] bufs,
int n_pages,
int tSize,
Heapfile temp_fd)
Initialize some necessary inormation, call Iobuf to create the object, and call init to finish instantiation |
void |
IoBuf()
Constructor - use init to initialize. |
void |
Put(Tuple buf)
Writes a tuple to the output buffer |
void |
reread()
if WRITE_BUFFER is true, call this mehtod to switch to read buffer. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int WRITE_BUFFER
public static final int READ_BUFFER
| Constructor Detail |
public IoBuf()
| Method Detail |
public void IoBuf()
public void init(byte[][] bufs,
int n_pages,
int tSize,
Heapfile temp_fd)
n_pages
- the number of pages of this buffer
tSize - Tuple.size()
temp_fd - the reference to a Heapfile
public void Put(Tuple buf)
throws NoOutputBuffer,
java.io.IOException,
java.lang.Exception
buf - the tuple written to buffer
NoOutputBuffer - the buffer is a input bufer now
java.io.IOException - some I/O fault
java.lang.Exception - other exceptions
public Tuple Get(Tuple buf)
throws java.io.IOException,
java.lang.Exception
buf - write the result to buf
java.io.IOException - some I/O fault
java.lang.Exception - other exceptions
public long flush()
throws java.io.IOException,
java.lang.Exception
java.io.IOException - some I/O fault
java.lang.Exception - other exceptions
public void reread()
throws java.io.IOException,
java.lang.Exception
java.io.IOException - some I/O fault
java.lang.Exception - other exceptions
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||