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