|
||||||||||
| 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.SinglevaluedBtree
public class SinglevaluedBtree
Btree implementation of SinglevaluedIndex
| 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 | |
|---|---|
SinglevaluedBtree()
No-argument constructor for reconstructing via read(). |
|
SinglevaluedBtree(java.lang.String name,
Storage.EntryType keyType,
Storage.EntryType dataType,
BtreePageSource pageSource)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.netbeans.mdr.persistence.btreeimpl.btreeindex.Btree |
|---|
add, beginRead, beginWrite, btreePut, consistencyCheck, dumpTree, endRead, endWrite, getKeyType, getName, getValueType, keySet, pageFactory, read, remove, 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 |
|---|
add, getKeyType, getName, getValueType, keySet, remove |
| Constructor Detail |
|---|
public SinglevaluedBtree(java.lang.String name,
Storage.EntryType keyType,
Storage.EntryType dataType,
BtreePageSource pageSource)
throws StorageException
StorageExceptionpublic SinglevaluedBtree()
| Method Detail |
|---|
protected void init()
throws StorageException
init in class BtreeStorageException
public java.lang.Object getIfExists(java.lang.Object key)
throws StorageException
getIfExists in interface SinglevaluedIndexkey - key for lookup
StorageException - If there was a problem reading
pages
public java.lang.Object getObjectIfExists(java.lang.Object key,
SinglevaluedIndex repos)
throws StorageException
getObjectIfExists in interface SinglevaluedIndexkey -
StorageException
public java.lang.Object get(java.lang.Object key)
throws StorageException
get in interface SinglevaluedIndexkey - key for lookup
StorageException - If no matching item was found, or
there was a problem reading pages
public java.lang.Object getObject(java.lang.Object key,
SinglevaluedIndex repos)
throws StorageException
getObject in interface SinglevaluedIndexkey -
StorageException
public boolean put(java.lang.Object key,
java.lang.Object data)
throws StorageException
put in interface SinglevaluedIndexkey - key to insertdata - data associated with key
StorageException - If a problem was encountered accessing storage
public 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 key
StorageBadRequestException - If key or data are incorrect type, or if no entry
exists matching key.
StorageException - If a problem was encountered accessing storage
public java.util.Collection values()
throws StorageException
values in interface SinglevaluedIndexStorageException
public 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 index
StorageException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||