|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgr.uoa.di.madgik.searchlibrary.operatorlibrary.indexfuse.DiskBuffer
public class DiskBuffer
Class used to wrap a file buffer for the records that are beeing processed
| Field Summary | |
|---|---|
long |
rtime
Time it took to read |
long |
wtime
Time it took to write |
| Constructor Summary | |
|---|---|
DiskBuffer(String filename,
boolean flag)
Creates a new DiskBuffer |
|
| Method Summary | |
|---|---|
void |
clear()
Clears the underlying structs |
void |
close()
Closes the underlying file stream |
FilePosition |
persist(gr.uoa.di.madgik.grs.record.Record rec)
Persists the provided record |
gr.uoa.di.madgik.grs.record.Record |
retrieve(FilePosition pos)
Retrieves the record from the given position |
Vector<gr.uoa.di.madgik.grs.record.Record> |
retrieve(Vector<FilePosition> pos)
Retrieves the records in teh given possitions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public long wtime
public long rtime
| Constructor Detail |
|---|
public DiskBuffer(String filename,
boolean flag)
throws Exception
DiskBuffer
filename - The name of the file to useflag - iftrue The file is opened for writing, otherwise for reading
Exception - An unrecoverable for the operation error occured| Method Detail |
|---|
public FilePosition persist(gr.uoa.di.madgik.grs.record.Record rec)
throws Exception
rec - The record to persist
Exception - An unrecoverable for the operation error occured
public void close()
throws Exception
Exception - An unrecoverable for the operation error occured
public Vector<gr.uoa.di.madgik.grs.record.Record> retrieve(Vector<FilePosition> pos)
throws Exception
pos - Teh possition to read from
Exception - An unrecoverable for the operation error occured
public gr.uoa.di.madgik.grs.record.Record retrieve(FilePosition pos)
throws Exception
pos - The position to retrieve the record from
Exception - An unrecoverable for the operation error occuredpublic void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||