|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.obsearch.storage.bdb.AbstractBDBOBStoreJe<TupleShort>
net.obsearch.storage.bdb.BDBOBStoreJeShort
public final class BDBOBStoreJeShort
BDBOBStoreShort is a wrapper for Berkeley indexes that assumes that keys are shorts and values are byte[].
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.obsearch.storage.bdb.AbstractBDBOBStoreJe |
|---|
AbstractBDBOBStoreJe.ByteArrayIterator, AbstractBDBOBStoreJe.CursorIterator<T> |
| Field Summary |
|---|
| Fields inherited from class net.obsearch.storage.bdb.AbstractBDBOBStoreJe |
|---|
counter, db, sequence, stats |
| Constructor Summary | |
|---|---|
BDBOBStoreJeShort(String name,
com.sleepycat.je.Database db,
com.sleepycat.je.Database seq,
OBStoreFactory fact,
boolean duplicates)
Builds a new Storage system by receiving a Berkeley DB database that uses shorts as a primary indexing method. |
|
| Method Summary | |
|---|---|
short |
bytesToValue(byte[] entry)
Converts the value of the given entry into its primitive type. |
net.obsearch.OperationStatus |
delete(short key)
Deletes the given key and its corresponding value from the database. |
byte[] |
getValue(short key)
Returns the associated value for the given key. |
net.obsearch.storage.CloseIterator<TupleShort> |
processAll()
|
net.obsearch.storage.CloseIterator<TupleShort> |
processRange(short low,
short high)
Process the given range of items (from low to high), including low and high. |
net.obsearch.storage.CloseIterator<TupleShort> |
processRangeNoDup(short low,
short high)
|
net.obsearch.storage.CloseIterator<TupleShort> |
processRangeReverse(short low,
short high)
Process the given range of items (from high to low), including low and high. |
net.obsearch.storage.CloseIterator<TupleShort> |
processRangeReverseNoDup(short low,
short high)
|
net.obsearch.OperationStatus |
put(short key,
byte[] value)
Inserts the key value pair. |
| Methods inherited from class net.obsearch.storage.bdb.AbstractBDBOBStoreJe |
|---|
allowsDuplicatedData, close, delete, deleteAll, getFactory, getName, getReadStats, getStats, getValue, nextId, optimize, prepareBytes, processAllKeys, processRange, processRangeNoDup, processRangeReverse, processRangeReverseNoDup, put, putIfNew, setReadStats, size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.obsearch.storage.OBStore |
|---|
close, delete, deleteAll, getFactory, getName, getReadStats, getStats, getValue, nextId, optimize, prepareBytes, processRange, processRangeNoDup, processRangeReverse, processRangeReverseNoDup, put, setReadStats, size |
| Constructor Detail |
|---|
public BDBOBStoreJeShort(String name,
com.sleepycat.je.Database db,
com.sleepycat.je.Database seq,
OBStoreFactory fact,
boolean duplicates)
throws com.sleepycat.je.DatabaseException
db - The database to be stored.seq - Sequences database.name - Name of the database.
com.sleepycat.je.DatabaseException - if something goes wrong with the database.| Method Detail |
|---|
public net.obsearch.OperationStatus delete(short key)
throws net.obsearch.exception.OBStorageException
OBStoreShort
delete in interface OBStoreShortkey - The key that will be deleted.
net.obsearch.OperationStatus.Status#OK if the key was found,
otherwise, net.obsearch.OperationStatus.Status#NOT_EXISTS.
net.obsearch.exception.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.public short bytesToValue(byte[] entry)
bytesToValue in interface OBStoreShortentry - The place where we will put the entry.
public byte[] getValue(short key)
throws IllegalArgumentException,
net.obsearch.exception.OBStorageException
OBStoreShort
getValue in interface OBStoreShortkey - the key that will be searched.
IllegalArgumentException - If the underlying storage system can hold multiple keys.
net.obsearch.exception.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.
public net.obsearch.OperationStatus put(short key,
byte[] value)
throws IllegalArgumentException,
net.obsearch.exception.OBStorageException
OBStoreShort
put in interface OBStoreShortkey - 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.
net.obsearch.exception.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.
IllegalArgumentException
public net.obsearch.storage.CloseIterator<TupleShort> processRange(short low,
short high)
throws net.obsearch.exception.OBStorageException
OBStoreShort
processRange in interface OBStoreShortnet.obsearch.exception.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.
public net.obsearch.storage.CloseIterator<TupleShort> processRangeNoDup(short low,
short high)
throws net.obsearch.exception.OBStorageException
net.obsearch.exception.OBStorageException
public net.obsearch.storage.CloseIterator<TupleShort> processRangeReverse(short low,
short high)
throws net.obsearch.exception.OBStorageException
OBStoreShort
processRangeReverse in interface OBStoreShortnet.obsearch.exception.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.
public net.obsearch.storage.CloseIterator<TupleShort> processRangeReverseNoDup(short low,
short high)
throws net.obsearch.exception.OBStorageException
net.obsearch.exception.OBStorageException
public net.obsearch.storage.CloseIterator<TupleShort> processAll()
throws net.obsearch.exception.OBStorageException
processAll in interface net.obsearch.storage.OBStore<TupleShort>net.obsearch.exception.OBStorageException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||