public class SinglevaluedBtree extends Btree implements SinglevaluedIndex
dataInfo, dataLength, dataType, hasBigKeys, keyInfo, keyType, name, pageIdLength, pageSize, pageSource, rootPageId, storage, uniqueKeys, uniqueValues| Constructor and Description |
|---|
SinglevaluedBtree()
No-argument constructor for reconstructing via read().
|
SinglevaluedBtree(java.lang.String name,
Storage.EntryType keyType,
Storage.EntryType dataType,
BtreePageSource pageSource) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
get(java.lang.Object key)
Return a single object associated with the specified key.
|
java.lang.Object |
getIfExists(java.lang.Object key)
Return a single object associated with the specified key.
|
java.lang.Object |
getObject(java.lang.Object key,
SinglevaluedIndex repos)
Like get, but if the index contains keys, this returns the object
corresponding to the key
|
java.lang.Object |
getObjectIfExists(java.lang.Object key,
SinglevaluedIndex repos)
Like getIfExists, but if the index contains keys, this returns the object
corresponding to the key
|
protected void |
init() |
boolean |
put(java.lang.Object key,
java.lang.Object data)
Add a new entry to the index.
|
java.util.Collection |
queryByKeyPrefix(java.lang.Object prefix,
SinglevaluedIndex primaryIndex)
Returns
BtreeEntryImpl key-value pairs, where the key contains the queried prefix. |
void |
replace(java.lang.Object key,
java.lang.Object data)
Replace an index entry.
|
java.util.Collection |
values()
Return a collection view of this btree's values.
|
add, beginRead, beginWrite, btreePut, consistencyCheck, dumpTree, endRead, endWrite, getKeyType, getName, getValueType, keySet, pageFactory, read, remove, setStorage, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, getKeyType, getName, getValueType, keySet, removepublic SinglevaluedBtree(java.lang.String name,
Storage.EntryType keyType,
Storage.EntryType dataType,
BtreePageSource pageSource)
throws StorageException
StorageExceptionpublic SinglevaluedBtree()
protected void init()
throws StorageException
init in class BtreeStorageExceptionpublic java.lang.Object getIfExists(java.lang.Object key)
throws StorageException
getIfExists in interface SinglevaluedIndexkey - key for lookupStorageException - If there was a problem reading
pagespublic java.lang.Object getObjectIfExists(java.lang.Object key,
SinglevaluedIndex repos)
throws StorageException
getObjectIfExists in interface SinglevaluedIndexkey - StorageExceptionpublic java.lang.Object get(java.lang.Object key)
throws StorageException
get in interface SinglevaluedIndexkey - key for lookupStorageException - If no matching item was found, or
there was a problem reading pagespublic java.lang.Object getObject(java.lang.Object key,
SinglevaluedIndex repos)
throws StorageException
getObject in interface SinglevaluedIndexkey - StorageExceptionpublic boolean put(java.lang.Object key,
java.lang.Object data)
throws StorageException
put in interface SinglevaluedIndexkey - key to insertdata - data associated with keyStorageException - If a problem was encountered accessing storagepublic void replace(java.lang.Object key,
java.lang.Object data)
throws StorageException
replace in interface SinglevaluedIndexkey - key whose entry is to be replaceddata - new data to be associated with keyStorageBadRequestException - If key or data are incorrect type, or if no entry
exists matching key.StorageException - If a problem was encountered accessing storagepublic java.util.Collection values()
throws StorageException
values in interface SinglevaluedIndexStorageExceptionpublic java.util.Collection queryByKeyPrefix(java.lang.Object prefix,
SinglevaluedIndex primaryIndex)
throws StorageException
BtreeEntryImpl key-value pairs, where the key contains the queried prefix.queryByKeyPrefix in interface SinglevaluedIndexprefix - queried prefixprimaryIndex - primary indexStorageExceptionCopyright © 2005-2012 Apache Software Foundation. All Rights Reserved.