|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.unister.semweb.drums.api.DRUMSReader<Data>
Data - an implementation of AbstractKVStorable, e.g. GeneralStorablepublic class DRUMSReader<Data extends AbstractKVStorable>
This class represents an efficient direct access reader. It holds all files opened for reading. Only use this Reader,
when there are no write-operations during reading. All files will be locked. Be careful: Opening all files may cost a
lot of memory, because all indices are loaded.
Please use the factory-method DRUMS.getReader() get an instance of this class.
| Method Summary | |
|---|---|
void |
closeFiles()
Closes all files |
java.util.List<Data> |
get(byte[]... keys)
Takes a list of keys and searches for that in all buckets. |
java.util.List<Data> |
get(long... keys)
Takes a list of keys and searches for that in all buckets. |
Data |
getNextElement(byte[] key)
Returns the element which has exact the key or is the next largest element after this key |
Data |
getPreviousElement(byte[] key)
Returns the element which has exact the key or is the next smallest element after this key |
java.util.List<Data> |
getRange(byte[] lowerKey,
byte[] upperKey)
Returns all elements between lowerKey and upperKey this function is still BUGGY. |
void |
openFiles()
Opens all files used by the underlying HashFunction. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void openFiles()
throws FileLockException,
java.io.IOException
files.
FileLockException
java.io.IOException
public java.util.List<Data> getRange(byte[] lowerKey,
byte[] upperKey)
throws java.io.IOException
lowerKey - upperKey -
java.io.IOException
public Data getPreviousElement(byte[] key)
throws java.io.IOException
key -
java.io.IOException
public Data getNextElement(byte[] key)
throws java.io.IOException
key -
java.io.IOException
public java.util.List<Data> get(long... keys)
throws DRUMSException,
java.io.IOException
keys -
ArrayList
DRUMSException
java.io.IOException
public java.util.List<Data> get(byte[]... keys)
throws DRUMSException,
java.io.IOException
keys -
ArrayList
DRUMSException
java.io.IOExceptionpublic void closeFiles()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||