public class MapDbRepository extends Object implements DataRepository
DataRepository.TupleSequence
Constructor and Description |
---|
MapDbRepository(String filename) |
Modifier and Type | Method and Description |
---|---|
int |
addItem(long key,
byte[] document,
int length)
Adds another document into the repository.
|
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].
|
void |
flush() |
public MapDbRepository(String filename)
public int addItem(long key, byte[] document, int length)
DataRepository
addItem
in interface DataRepository
public DataInputStream elementAt(long key, int revision)
DataRepository
elementAt
in interface DataRepository
key
- the key of the blockrevision
- revision number of the block, 0 is used for the latest (current) revisionpublic DataRepository.TupleSequence elements()
DataRepository
elements
in interface DataRepository
public void flush()
flush
in interface DataRepository
public void close()
DataRepository
close
in interface DataRepository
public void destroy()
DataRepository
destroy
in interface DataRepository
Copyright © 2016 Egothor. All Rights Reserved.