|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.egothor.repository.FastBlindAppender
public class FastBlindAppender
This class uses a simple way to recognize known URIs and their ids. It uses a bit array and URIs are hashed into it. Id of an URI is given as the bit offset in the array. Disk is not accessed during appending of URIs.
Constructor Summary | |
---|---|
FastBlindAppender(java.lang.String filename,
int capacity)
|
Method Summary | |
---|---|
long |
append(java.net.URI uri)
Returns id or -id of the URI. |
void |
close()
|
long |
size()
Returns number of URIs in the base, or -1 iff the value is unknown. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FastBlindAppender(java.lang.String filename, int capacity) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public long append(java.net.URI uri) throws DatabaseStorageException
append
in interface URIRepositoryAppender
DatabaseStorageException
public void close()
close
in interface URIRepositoryAppender
public long size()
URIRepositoryAppender
size
in interface URIRepositoryAppender
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |