public interface OSBTreeBonsai<K,V> extends OTreeInternal<K,V>
OSBTreeV1
and designed to store small entries.
OSBTreeV1
, but it have tiny buckets.OReadCache
could contain several buckets. That's why there is no huge resource
consuming when you have lots of OSBTreeBonsai that contain only few records.
+--------------------------------------------------------------------------------------------+
| DISK CACHE PAGE |
|+---------------+ +---------------+ +---------------+ +---------------+ +---------------+ |
|| Bonsai Bucket | | Bonsai Bucket | | Bonsai Bucket | | Bonsai Bucket | | Bonsai Bucket |...|
|+---------------+ +---------------+ +---------------+ +---------------+ +---------------+ |
+--------------------------------------------------------------------------------------------+
OTreeInternal.AccumulativeListener<K,V>, OTreeInternal.RangeResultListener<K,V>
Modifier and Type | Method and Description |
---|---|
void |
clear(OAtomicOperation atomicOperation)
Deletes all entries from tree.
|
void |
delete(OAtomicOperation atomicOperation)
Deletes whole tree.
|
K |
firstKey() |
V |
get(K key)
Search for entry with specific key and return its value.
|
OBonsaiCollectionPointer |
getCollectionPointer() |
long |
getFileId()
Gets id of file where this bonsai tree is stored.
|
OBinarySerializer<K> |
getKeySerializer() |
int |
getRealBagSize(Map<K,Change> changes)
Hardcoded method for Bag to avoid creation of extra layer.
|
OBonsaiBucketPointer |
getRootBucketPointer() |
Collection<V> |
getValuesBetween(K keyFrom,
boolean fromInclusive,
K keyTo,
boolean toInclusive,
int maxValuesToFetch) |
OBinarySerializer<V> |
getValueSerializer() |
Collection<V> |
getValuesMajor(K key,
boolean inclusive,
int maxValuesToFetch) |
Collection<V> |
getValuesMinor(K key,
boolean inclusive,
int maxValuesToFetch) |
K |
lastKey() |
void |
loadEntriesBetween(K keyFrom,
boolean fromInclusive,
K keyTo,
boolean toInclusive,
OTreeInternal.RangeResultListener<K,V> listener) |
void |
loadEntriesMajor(K key,
boolean inclusive,
boolean ascSortOrder,
OTreeInternal.RangeResultListener<K,V> listener) |
void |
loadEntriesMinor(K key,
boolean inclusive,
OTreeInternal.RangeResultListener<K,V> listener) |
void |
markToDelete(OAtomicOperation atomicOperation) |
boolean |
put(OAtomicOperation atomicOperation,
K key,
V value) |
V |
remove(OAtomicOperation atomicOperation,
K key) |
long |
size() |
long getFileId()
OReadCache
OBonsaiBucketPointer getRootBucketPointer()
OBonsaiCollectionPointer getCollectionPointer()
V get(K key)
key
- boolean put(OAtomicOperation atomicOperation, K key, V value) throws IOException
IOException
void clear(OAtomicOperation atomicOperation) throws IOException
atomicOperation
- IOException
void delete(OAtomicOperation atomicOperation)
atomicOperation
- long size()
size
in interface OTreeInternal<K,V>
V remove(OAtomicOperation atomicOperation, K key) throws IOException
remove
in interface OTreeInternal<K,V>
IOException
Collection<V> getValuesMinor(K key, boolean inclusive, int maxValuesToFetch)
void loadEntriesMinor(K key, boolean inclusive, OTreeInternal.RangeResultListener<K,V> listener)
Collection<V> getValuesMajor(K key, boolean inclusive, int maxValuesToFetch)
void loadEntriesMajor(K key, boolean inclusive, boolean ascSortOrder, OTreeInternal.RangeResultListener<K,V> listener)
loadEntriesMajor
in interface OTreeInternal<K,V>
Collection<V> getValuesBetween(K keyFrom, boolean fromInclusive, K keyTo, boolean toInclusive, int maxValuesToFetch)
K firstKey()
firstKey
in interface OTreeInternal<K,V>
K lastKey()
void loadEntriesBetween(K keyFrom, boolean fromInclusive, K keyTo, boolean toInclusive, OTreeInternal.RangeResultListener<K,V> listener)
int getRealBagSize(Map<K,Change> changes)
Don't make any changes to tree.
changes
- Bag changesOBinarySerializer<K> getKeySerializer()
OBinarySerializer<V> getValueSerializer()
void markToDelete(OAtomicOperation atomicOperation) throws IOException
IOException
Copyright © 2009–2020 OrientDB. All rights reserved.