public class MultivaluedBtree extends Btree implements MultivaluedIndex
dataInfo, dataLength, dataType, hasBigKeys, keyInfo, keyType, name, pageIdLength, pageSize, pageSource, rootPageId, storage, uniqueKeys, uniqueValues| Constructor and Description |
|---|
MultivaluedBtree() |
MultivaluedBtree(java.lang.String name,
Storage.EntryType keyType,
Storage.EntryType dataType,
boolean uniqueValues,
BtreePageSource pageSource) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.Object key,
java.lang.Object data)
Add a new entry to the index.
|
java.util.Collection |
getItems(java.lang.Object key)
Returns a collection view of the values associated in the index with specified key.
|
java.util.Collection |
getObjects(java.lang.Object key,
SinglevaluedIndex repos)
Like getItems, but if the values in the index are a key type,
returns the objects associated with the keys.
|
protected void |
init() |
boolean |
isUnique()
If true, the collection of values is constrained to hold
no more than one of any value.
|
java.util.Collection |
queryByKeyPrefix(java.lang.Object prefix,
SinglevaluedIndex primaryIndex)
Returns list of
BtreeEntryImpl key-value pairs, where key contains
the queried prefix. |
boolean |
remove(java.lang.Object key)
Remove all entries associated with the specified key.
|
boolean |
remove(java.lang.Object key,
java.lang.Object value)
Removes the first occurrence of the specified element in the list
of values associated with the specified key.
|
protected void |
updateKeyModCount(java.lang.Object key)
Checks if an instance of BtreeListByKey related to key is in cache, if so, increases
list's modification counter.
|
beginRead, beginWrite, btreePut, consistencyCheck, dumpTree, endRead, endWrite, getKeyType, getName, getValueType, keySet, pageFactory, read, setStorage, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetKeyType, getName, getValueType, keySetpublic MultivaluedBtree(java.lang.String name,
Storage.EntryType keyType,
Storage.EntryType dataType,
boolean uniqueValues,
BtreePageSource pageSource)
throws StorageException
StorageExceptionpublic MultivaluedBtree()
protected void init()
throws StorageException
init in class BtreeStorageExceptionpublic java.util.Collection getItems(java.lang.Object key)
throws StorageException
getItems in interface MultivaluedIndexkey - StorageExceptionpublic java.util.Collection getObjects(java.lang.Object key,
SinglevaluedIndex repos)
throws StorageException
getObjects in interface MultivaluedIndexkey - repos - where to look objetcs upStorageExceptionpublic boolean isUnique()
isUnique in interface MultivaluedIndexStorageExceptionpublic boolean remove(java.lang.Object key,
java.lang.Object value)
throws StorageException
remove in interface MultivaluedIndexkey - value - StorageExceptionpublic void add(java.lang.Object key,
java.lang.Object data)
throws StorageException
Btreeadd in interface Indexadd in class Btreekey - key to insertdata - data associated with keyStorageBadRequestException - If key or data are incorrect type, or if
the insert would violate the constraints of this indexStorageException - If a problem was encountered accessing storagepublic boolean remove(java.lang.Object key)
throws StorageException
Btreeremove in interface Indexremove in class Btreekey - key for entry to be removedStorageException - If there was a problem reading or
writing pagespublic java.util.Collection queryByKeyPrefix(java.lang.Object prefix,
SinglevaluedIndex primaryIndex)
throws StorageException
BtreeEntryImpl key-value pairs, where key contains
the queried prefix.queryByKeyPrefix in interface MultivaluedIndexprefix - queried prefixprimaryIndex - primary indexStorageExceptionprotected void updateKeyModCount(java.lang.Object key)
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.