org.egothor.repository
Class BijectInt2StringAppender
java.lang.Object
org.egothor.repository.BijectInt2StringAppender
All Implemented Interfaces: URIRepositoryAppender
Direct Known Subclasses: BijectInt2String
public class BijectInt2StringAppender extends java.lang.Objectimplements URIRepositoryAppender
This class represents the database of URIs and their unique identificators.
Author:
Leo Galambos
Field Summary
protected com.sleepycat.db.Database
repoURIInt
Method Summary
long
append (java.net.URI uri)
Returns the new identifier related to the URI, -id iff the URI already exists under the id
in the base.
void
close ()
long
resolve (java.net.URI uri)
Retrives long value (ID) assigned to the URI by some previous call of append(java.net.URI)
method, -1 iff
the URI is unknown to this base.
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
repoURIInt
protected com.sleepycat.db.Database repoURIInt
BijectInt2StringAppender
public BijectInt2StringAppender (java.lang.String name,
int uris_cache)
throws com.sleepycat.db.DatabaseException,
java.io.FileNotFoundException,
java.io.UnsupportedEncodingException
Throws:
com.sleepycat.db.DatabaseException
java.io.FileNotFoundException
java.io.UnsupportedEncodingException
size
public long size ()
Description copied from interface: URIRepositoryAppender
Returns number of URIs in the base, or -1 iff the value is unknown.
Specified by: size
in interface URIRepositoryAppender
append
public long append (java.net.URI uri)
throws DatabaseStorageException
Returns the new identifier related to the URI, -id iff the URI already exists under the id
in the base.
Specified by: append
in interface URIRepositoryAppender
Throws:
DatabaseStorageException
resolve
public long resolve (java.net.URI uri)
throws DatabaseStorageException
Retrives long value (ID) assigned to the URI by some previous call of append(java.net.URI)
method, -1 iff
the URI is unknown to this base.
Throws:
DatabaseStorageException
close
public void close ()
Specified by: close
in interface URIRepositoryAppender