|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.egothor.store.Documents
public class Documents
Documents implements a documents DB structure on disc. The structure
consists of two files: the first one is used as an index, and the
second one as a data store. When you want to read the element with key
uid
the algorithm works as follows:
Constructor Summary | |
---|---|
Documents(java.lang.String location)
Constructor for the Documents object. |
Method Summary | |
---|---|
void |
close()
Closes the structure. |
void |
destroy()
Destroy this data structure. |
static void |
destroy(java.lang.String location)
|
DocumentData |
elementAt(long uid)
Return the element with the given uid . |
protected void |
finalize()
Close this structure and attempt garbage collection. |
IMetaReader |
getReader(Bitmap map)
Open this structure for sequential reading. |
long |
size()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Documents(java.lang.String location) throws java.io.IOException
location
- the location where the files will be
created
java.io.IOException
- if an I/O error occursMethod Detail |
---|
public IMetaReader getReader(Bitmap map)
public void destroy()
close()
. Then
it removes these files from the directory where the structure is
stored: bitmap, idocs, docs.
public static void destroy(java.lang.String location)
public DocumentData elementAt(long uid)
uid
.
uid
- the key of the element to fetch
public void close()
#commit
and then it closes
both data files (idocs and docs).
Documents(String)
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- you never know what might happen!public long size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |