|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.mdr.persistence.btreeimpl.btreeindex.Btree
org.netbeans.mdr.persistence.btreeimpl.btreeindex.MultivaluedBtree
Btree implementation of MultivaluedIndex interface.
Field Summary |
Fields inherited from class org.netbeans.mdr.persistence.btreeimpl.btreeindex.Btree |
dataInfo, dataLength, dataType, hasBigKeys, keyInfo, keyType, name, pageIdLength, pageSize, pageSource, rootPageId, storage, uniqueKeys, uniqueValues |
Constructor Summary | |
MultivaluedBtree()
|
|
MultivaluedBtree(java.lang.String name,
Storage.EntryType keyType,
Storage.EntryType dataType,
boolean uniqueValues,
BtreePageSource pageSource)
|
Method Summary | |
void |
add(java.lang.Object key,
java.lang.Object data)
Adds the specified value to values associated in this index with the specified key. |
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)
Removes all values assosiated in the index with 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. |
Methods inherited from class org.netbeans.mdr.persistence.btreeimpl.btreeindex.Btree |
beginRead, beginWrite, btreePut, consistencyCheck, dumpTree, endRead, endWrite, getKeyType, getName, getValueType, keySet, pageFactory, read, setStorage, write |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.netbeans.mdr.persistence.Index |
getKeyType, getName, getValueType, keySet |
Constructor Detail |
public MultivaluedBtree(java.lang.String name, Storage.EntryType keyType, Storage.EntryType dataType, boolean uniqueValues, BtreePageSource pageSource) throws StorageException
public MultivaluedBtree()
Method Detail |
protected void init() throws StorageException
init
in class Btree
StorageException
public java.util.Collection getItems(java.lang.Object key) throws StorageException
getItems
in interface MultivaluedIndex
key
-
StorageException
public java.util.Collection getObjects(java.lang.Object key, SinglevaluedIndex repos) throws StorageException
getObjects
in interface MultivaluedIndex
key
- repos
- where to look objetcs up
StorageException
public boolean isUnique()
isUnique
in interface MultivaluedIndex
StorageException
public boolean remove(java.lang.Object key, java.lang.Object value) throws StorageException
remove
in interface MultivaluedIndex
key
- value
-
StorageException
public void add(java.lang.Object key, java.lang.Object data) throws StorageException
Index
add
in interface Index
add
in class Btree
key
- key to insertdata
- data associated with key
StorageException
- If a problem was encountered accessing storagepublic boolean remove(java.lang.Object key) throws StorageException
Index
remove
in interface Index
remove
in class Btree
key
- key for entry to be removed
StorageException
- 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 MultivaluedIndex
prefix
- queried prefixprimaryIndex
- primary index
StorageException
protected void updateKeyModCount(java.lang.Object key)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |