|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OBStoreLong
OBStoreLong abstracts a generic storage system. The purpose of this class is to allow OBSearch to run on top of different storage systems (distributed, local, file system based, etc). The keys can be sorted, and range queries are possible. This interface provides utility methods for keys of type long.
Method Summary | |
---|---|
long |
bytesToValue(byte[] entry)
Convert a byte entry into a long. |
OperationStatus |
delete(long key)
Deletes the given key and its corresponding value from the database. |
byte[] |
getValue(long key)
Returns the associated value for the given key. |
CloseIterator<TupleLong> |
processRange(long low,
long high)
Process the given range of items (from low to high), including low and high. |
CloseIterator<TupleLong> |
processRangeReverse(long low,
long high)
Process the given range of items (from high to low), including low and high. |
OperationStatus |
put(long key,
byte[] value)
Inserts the key value pair. |
Methods inherited from interface net.obsearch.storage.OBStore |
---|
close, delete, deleteAll, getFactory, getName, getReadStats, getStats, getValue, nextId, optimize, prepareBytes, processAll, processRange, processRangeNoDup, processRangeReverse, processRangeReverseNoDup, put, setReadStats, size |
Method Detail |
---|
byte[] getValue(long key) throws IllegalArgumentException, OBStorageException
key
- the key that will be searched.
IllegalArgumentException
- If the underlying storage system can hold multiple keys.
OBStorageException
- If an exception occurs at the underlying storage system.
You can query the exception to see more details regarding
the nature of the error.CloseIterator<TupleLong> processRange(long low, long high) throws OBStorageException
low
- high
-
OBStorageException
- If an exception occurs at the underlying storage system.
You can query the exception to see more details regarding
the nature of the error.CloseIterator<TupleLong> processRangeReverse(long low, long high) throws OBStorageException
low
- high
-
OBStorageException
- If an exception occurs at the underlying storage system.
You can query the exception to see more details regarding
the nature of the error.OperationStatus put(long key, byte[] value) throws OBStorageException
key
- Key to insertvalue
- The value that the key will hold after this operation
completes.
net.obsearch.OperationStatus.Status#OK
the record
was inserted/updated successfully.
net.obsearch.OperationStatus.Status#ERROR
if
the record could not be updated.
OBStorageException
- If an exception occurs at the underlying storage system.
You can query the exception to see more details regarding
the nature of the error.OperationStatus delete(long key) throws OBStorageException
key
- The key that will be deleted.
net.obsearch.OperationStatus.Status#OK
if the key was found,
otherwise, net.obsearch.OperationStatus.Status#NOT_EXISTS
.
OBStorageException
- If an exception occurs at the underlying storage system.
You can query the exception to see more details regarding
the nature of the error.long bytesToValue(byte[] entry)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |