public class WebStore extends Object implements URIRepositoryAppender, DataRepository
| Modifier and Type | Class and Description |
|---|---|
static class |
WebStore.Page |
DataRepository.TupleSequence| Constructor and Description |
|---|
WebStore(URIRepository map,
DataRepository data)
Creates a new instance of WebStore
|
| Modifier and Type | Method and Description |
|---|---|
int |
addItem(long page_id,
byte[] document,
int length)
Adds another document into the repository.
|
long |
append(URI uri)
Returns the new identifier related to the URI, -id iff the URI already exists under the id
in the base.
|
void |
close()
Closes the repository.
|
void |
destroy()
Destroy the repository.
|
DataInputStream |
elementAt(long key,
int revision)
Retrieves a data block.
|
DataRepository.TupleSequence |
elements()
The tuples are [long:uid;int:rev;Object:DataInputStream;Object:URI].
|
void |
flush() |
WebStore.Page |
pageAt(long key,
int revision)
Retrieves a data block.
|
long |
size()
Returns number of URIs in the base, or -1 iff the value is unknown.
|
public WebStore(URIRepository map, DataRepository data)
public void close()
DataRepositoryclose in interface DataRepositoryclose in interface URIRepositoryAppenderpublic void destroy()
DataRepositorydestroy in interface DataRepositorypublic int addItem(long page_id,
byte[] document,
int length)
addItem in interface DataRepositorypublic long append(URI uri) throws DatabaseStorageException
append in interface URIRepositoryAppenderDatabaseStorageExceptionpublic WebStore.Page pageAt(long key, int revision) throws DatabaseStorageException
key - the key of the blockrevision - revision number of the block, 0 is used for the latest (current) revisionDatabaseStorageExceptionpublic long size()
URIRepositoryAppendersize in interface URIRepositoryAppenderpublic DataInputStream elementAt(long key, int revision)
DataRepositoryelementAt in interface DataRepositorykey - the key of the blockrevision - revision number of the block, 0 is used for the latest (current) revisionpublic DataRepository.TupleSequence elements()
elements in interface DataRepositorypublic void flush()
flush in interface DataRepositoryCopyright © 2016 Egothor. All Rights Reserved.