|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectiterator.OBuf
O_buf::Put takes tuples and stores them on the buffer pages that were passed to O_buf::init. O_buf::flush inserts them enmass into a temporary HeapFile.
| 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 | |
OBuf()
fault constructor no args -- use init to initialize |
|
| Method Summary | |
long |
flush()
returns the # of tuples written. |
void |
init(byte[][] bufs,
int n_pages,
int tSize,
Heapfile temp_fd,
boolean buffer)
O_buf is an output buffer. |
Tuple |
Put(Tuple buf)
Writes a tuple to the output buffer |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public OBuf()
| Method Detail |
public void init(byte[][] bufs,
int n_pages,
int tSize,
Heapfile temp_fd,
boolean buffer)
bufs - temporary buffer to pages.(EACH ELEMENT IS A SINGLE BUFFER PAGE).n_pages - the number of pagestSize - tuple sizetemp_fd - fd of a HeapFilebuffer - true => it is used as a buffer => if it is flushed, print
a nasty message. it is false by default.
public Tuple Put(Tuple buf)
throws java.io.IOException,
java.lang.Exception
buf - the tuple written to buffer
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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||