Package org.h2.mvstore.rtree
Class MVRTreeMap<V>
- Type Parameters:
V- the value class
- All Implemented Interfaces:
ConcurrentMap<Spatial,,V> Map<Spatial,V>
An r-tree implementation. It supports both the linear and the quadratic split
algorithm.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for this class.static classA cursor to iterate over a subset of the keys.Nested classes/interfaces inherited from class org.h2.mvstore.MVMap
MVMap.BasicBuilder<M extends MVMap<K,V>, K, V>, MVMap.Decision, MVMap.DecisionMaker<V>, MVMap.MapBuilder<M extends MVMap<K, V>, K, V> Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionMVRTreeMap(Map<String, Object> config, SpatialDataType keyType, DataType<V> valueType) -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a given key-value pair.voidAdd all node keys (including internal bounds) to the given list.cloneIt()Clone the current map.Iterate over all keys that are fully contained within the given rectangle.Iterate over all keys that have an intersection with the given rectangle.Get the object for the given key.protected intGet the child page count for this page.getType()Get the map type.booleanoperate(Spatial key, V value, MVMap.DecisionMaker<? super V> decisionMaker) Add, replace or remove a key-value pair.Add or replace a key-value pair.Remove a key-value pair, if the key exists.voidsetQuadraticSplit(boolean quadraticSplit) Methods inherited from class org.h2.mvstore.MVMap
append, asString, beforeWrite, ceilingKey, clear, containsKey, createEmptyLeaf, createEmptyNode, cursor, cursor, cursor, entrySet, equals, firstKey, floorKey, flushAndGetRoot, get, getId, getKey, getKeyIndex, getKeyType, getName, getRoot, getRootPage, getStore, getValueType, getVersion, hashCode, higherKey, higherKey, isClosed, isEmpty, isPersistent, isReadOnly, isVolatile, keyIterator, keyIteratorReverse, keyList, keySet, lastKey, lowerKey, lowerKey, openVersion, putIfAbsent, registerUnsavedMemory, remove, replace, replace, setVolatile, size, sizeAsLong, toString, trimLast, tryLock, unlockRoot, updateRootMethods inherited from class java.util.AbstractMap
clone, containsValue, putAll, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.concurrent.ConcurrentMap
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, replaceAllMethods inherited from interface java.util.Map
containsValue, putAll, values
-
Constructor Details
-
MVRTreeMap
-
-
Method Details
-
cloneIt
Description copied from class:MVMapClone the current map. -
findIntersectingKeys
Iterate over all keys that have an intersection with the given rectangle.- Parameters:
x- the rectangle- Returns:
- the iterator
-
findContainedKeys
Iterate over all keys that are fully contained within the given rectangle.- Parameters:
x- the rectangle- Returns:
- the iterator
-
get
Get the object for the given key. An exact match is required. -
remove
Remove a key-value pair, if the key exists. -
operate
Description copied from class:MVMapAdd, replace or remove a key-value pair. -
put
Description copied from class:MVMapAdd or replace a key-value pair. -
add
Add a given key-value pair. The key should not exist (if it exists, the result is undefined).- Parameters:
key- the keyvalue- the value
-
addNodeKeys
Add all node keys (including internal bounds) to the given list. This is mainly used to visualize the internal splits.- Parameters:
list- the listp- the root page
-
isQuadraticSplit
public boolean isQuadraticSplit() -
setQuadraticSplit
public void setQuadraticSplit(boolean quadraticSplit) -
getChildPageCount
Description copied from class:MVMapGet the child page count for this page. This is to allow another map implementation to override the default, in case the last child is not to be used.- Overrides:
getChildPageCountin classMVMap<Spatial,V> - Parameters:
p- the page- Returns:
- the number of direct children
-
getType
Description copied from class:MVMapGet the map type. When opening an existing map, the map type must match.
-