|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OBStoreInt
OBStoreInt 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 int.
Method Summary | |
---|---|
int |
bytesToValue(byte[] entry)
Convert a byte entry into a int. |
OperationStatus |
delete(int key)
Deletes the given key and its corresponding value from the database. |
byte[] |
getValue(int key)
Returns the associated value for the given key. |
CloseIterator<TupleInt> |
processRange(int low,
int high)
Process the given range of items (from low to high), including low and high. |
CloseIterator<TupleInt> |
processRangeReverse(int low,
int high)
Process the given range of items (from high to low), including low and high. |
OperationStatus |
put(int 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(int 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<TupleInt> processRange(int low, int 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<TupleInt> processRangeReverse(int low, int 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(int 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(int 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.int bytesToValue(byte[] entry)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |