public final class Table extends Object implements URIRepositoryAppender
| Constructor and Description |
|---|
Table(int bucket_size,
String digestAlgorithm,
String filename,
int nodes_cache,
int uris_cache,
int buckets_size) |
| Modifier and Type | Method and Description |
|---|---|
long |
append(URI uri)
Returns the new identifier related to the URI, -id iff the URI already exists under the id
in the base.
|
long |
buckets() |
float |
bucketsCacheEff() |
float |
cacheEff() |
void |
close() |
int |
dataSize()
Length of a hash value.
|
long |
nodes() |
float |
nodesCacheEff() |
long |
size()
Returns number of URIs in the base, or -1 iff the value is unknown.
|
boolean |
wasNew()
Returns true if and only if the last successful
push(byte[]) inserted a new item. |
public Table(int bucket_size,
String digestAlgorithm,
String filename,
int nodes_cache,
int uris_cache,
int buckets_size)
throws IOException,
NoSuchAlgorithmException
bucket_size - digestAlgorithm - filename - nodes_cache - uris_cache - buckets_size - IOExceptionNoSuchAlgorithmExceptionpublic long size()
URIRepositoryAppendersize in interface URIRepositoryAppenderpublic long buckets()
public long nodes()
public float nodesCacheEff()
public float bucketsCacheEff()
public float cacheEff()
public boolean wasNew()
push(byte[]) inserted a new item.public int dataSize()
public void close()
close in interface URIRepositoryAppenderpublic long append(URI uri)
URIRepositoryAppenderappend in interface URIRepositoryAppenderCopyright © 2016 Egothor. All Rights Reserved.