Class BTreeBonsaiGlobal
java.lang.Object
com.orientechnologies.orient.core.storage.index.sbtreebonsai.global.BTreeBonsaiGlobal
- All Implemented Interfaces:
OTreeInternal<OIdentifiable,,Integer> OSBTreeBonsai<OIdentifiable,Integer>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.orientechnologies.orient.core.storage.index.sbtree.OTreeInternal
OTreeInternal.AccumulativeListener<K,V>, OTreeInternal.RangeResultListener<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionBTreeBonsaiGlobal(BTree bTree, int intFileId, long ridBagId, OBinarySerializer<OIdentifiable> keySerializer, OBinarySerializer<Integer> valueSerializer) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear(OAtomicOperation atomicOperation) Deletes all entries from tree.voiddelete(OAtomicOperation atomicOperation) Deletes whole tree.firstKey()get(OIdentifiable key) Search for entry with specific key and return its value.longGets id of file where this bonsai tree is stored.intgetRealBagSize(Map<OIdentifiable, Change> changes) Hardcoded method for Bag to avoid creation of extra layer.getValuesBetween(OIdentifiable keyFrom, boolean fromInclusive, OIdentifiable keyTo, boolean toInclusive, int maxValuesToFetch) getValuesMajor(OIdentifiable key, boolean inclusive, int maxValuesToFetch) getValuesMinor(OIdentifiable key, boolean inclusive, int maxValuesToFetch) booleanisEmpty()lastKey()voidloadEntriesBetween(OIdentifiable keyFrom, boolean fromInclusive, OIdentifiable keyTo, boolean toInclusive, OTreeInternal.RangeResultListener<OIdentifiable, Integer> listener) voidloadEntriesMajor(OIdentifiable key, boolean inclusive, boolean ascSortOrder, OTreeInternal.RangeResultListener<OIdentifiable, Integer> listener) voidloadEntriesMinor(OIdentifiable key, boolean inclusive, OTreeInternal.RangeResultListener<OIdentifiable, Integer> listener) booleanput(OAtomicOperation atomicOperation, OIdentifiable key, Integer value) remove(OAtomicOperation atomicOperation, OIdentifiable key)
-
Constructor Details
-
BTreeBonsaiGlobal
public BTreeBonsaiGlobal(BTree bTree, int intFileId, long ridBagId, OBinarySerializer<OIdentifiable> keySerializer, OBinarySerializer<Integer> valueSerializer)
-
-
Method Details
-
getCollectionPointer
- Specified by:
getCollectionPointerin interfaceOSBTreeBonsai<OIdentifiable,Integer> - Returns:
- pointer to a collection.
-
getFileId
public long getFileId()Description copied from interface:OSBTreeBonsaiGets id of file where this bonsai tree is stored.- Specified by:
getFileIdin interfaceOSBTreeBonsai<OIdentifiable,Integer> - Returns:
- id of file in
OReadCache
-
getRootBucketPointer
- Specified by:
getRootBucketPointerin interfaceOSBTreeBonsai<OIdentifiable,Integer> - Returns:
- the pointer to the root bucket in tree.
-
get
Description copied from interface:OSBTreeBonsaiSearch for entry with specific key and return its value.- Specified by:
getin interfaceOSBTreeBonsai<OIdentifiable,Integer> - Parameters:
key-- Returns:
- value associated with given key, NULL if no value is associated.
-
put
- Specified by:
putin interfaceOSBTreeBonsai<OIdentifiable,Integer>
-
clear
Description copied from interface:OSBTreeBonsaiDeletes all entries from tree.- Specified by:
clearin interfaceOSBTreeBonsai<OIdentifiable,Integer> - Parameters:
atomicOperation-
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceOSBTreeBonsai<OIdentifiable,Integer> - Specified by:
isEmptyin interfaceOTreeInternal<OIdentifiable,Integer>
-
delete
Description copied from interface:OSBTreeBonsaiDeletes whole tree. After this operation tree is no longer usable.- Specified by:
deletein interfaceOSBTreeBonsai<OIdentifiable,Integer> - Parameters:
atomicOperation-
-
remove
- Specified by:
removein interfaceOSBTreeBonsai<OIdentifiable,Integer> - Specified by:
removein interfaceOTreeInternal<OIdentifiable,Integer>
-
getValuesMinor
public Collection<Integer> getValuesMinor(OIdentifiable key, boolean inclusive, int maxValuesToFetch) - Specified by:
getValuesMinorin interfaceOSBTreeBonsai<OIdentifiable,Integer>
-
loadEntriesMinor
public void loadEntriesMinor(OIdentifiable key, boolean inclusive, OTreeInternal.RangeResultListener<OIdentifiable, Integer> listener) - Specified by:
loadEntriesMinorin interfaceOSBTreeBonsai<OIdentifiable,Integer>
-
getValuesMajor
public Collection<Integer> getValuesMajor(OIdentifiable key, boolean inclusive, int maxValuesToFetch) - Specified by:
getValuesMajorin interfaceOSBTreeBonsai<OIdentifiable,Integer>
-
loadEntriesMajor
public void loadEntriesMajor(OIdentifiable key, boolean inclusive, boolean ascSortOrder, OTreeInternal.RangeResultListener<OIdentifiable, Integer> listener) - Specified by:
loadEntriesMajorin interfaceOSBTreeBonsai<OIdentifiable,Integer> - Specified by:
loadEntriesMajorin interfaceOTreeInternal<OIdentifiable,Integer>
-
getValuesBetween
public Collection<Integer> getValuesBetween(OIdentifiable keyFrom, boolean fromInclusive, OIdentifiable keyTo, boolean toInclusive, int maxValuesToFetch) - Specified by:
getValuesBetweenin interfaceOSBTreeBonsai<OIdentifiable,Integer>
-
firstKey
- Specified by:
firstKeyin interfaceOSBTreeBonsai<OIdentifiable,Integer> - Specified by:
firstKeyin interfaceOTreeInternal<OIdentifiable,Integer>
-
lastKey
- Specified by:
lastKeyin interfaceOSBTreeBonsai<OIdentifiable,Integer>
-
loadEntriesBetween
public void loadEntriesBetween(OIdentifiable keyFrom, boolean fromInclusive, OIdentifiable keyTo, boolean toInclusive, OTreeInternal.RangeResultListener<OIdentifiable, Integer> listener) - Specified by:
loadEntriesBetweenin interfaceOSBTreeBonsai<OIdentifiable,Integer>
-
getRealBagSize
Description copied from interface:OSBTreeBonsaiHardcoded method for Bag to avoid creation of extra layer.Don't make any changes to tree.
- Specified by:
getRealBagSizein interfaceOSBTreeBonsai<OIdentifiable,Integer> - Parameters:
changes- Bag changes- Returns:
- real bag size
-
getKeySerializer
- Specified by:
getKeySerializerin interfaceOSBTreeBonsai<OIdentifiable,Integer>
-
getValueSerializer
- Specified by:
getValueSerializerin interfaceOSBTreeBonsai<OIdentifiable,Integer>
-