|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
org.h2.mvstore.MVMap<SpatialKey,V>
org.h2.mvstore.rtree.MVRTreeMap<V>
V
- the value classpublic class MVRTreeMap<V>
An r-tree implementation. It uses the quadratic split algorithm.
Nested Class Summary | |
---|---|
static class |
MVRTreeMap.Builder<V>
A builder for this class. |
static class |
MVRTreeMap.RTreeCursor
A cursor to iterate over a subset of the keys. |
Nested classes/interfaces inherited from class org.h2.mvstore.MVMap |
---|
MVMap.MapBuilder<M extends MVMap<K,V>,K,V> |
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary |
---|
Fields inherited from class org.h2.mvstore.MVMap |
---|
currentWriteVersion, root, store, writeVersion |
Constructor Summary | |
---|---|
MVRTreeMap(int dimensions,
DataType valueType)
|
Method Summary | ||
---|---|---|
void |
add(SpatialKey key,
V value)
Add a given key-value pair. |
|
void |
addNodeKeys(java.util.ArrayList<SpatialKey> list,
Page p)
Add all node keys (including internal bounds) to the given list. |
|
static
|
create(int dimensions,
DataType valueType)
Create a new map with the given dimensions and value type. |
|
MVRTreeMap.RTreeCursor |
findContainedKeys(SpatialKey x)
Iterate over all keys that are fully contained within the given rectangle. |
|
MVRTreeMap.RTreeCursor |
findIntersectingKeys(SpatialKey x)
Iterate over all keys that have an intersection with the given rectangle. |
|
V |
get(java.lang.Object key)
Get a value. |
|
protected java.lang.Object |
get(Page p,
java.lang.Object key)
Get the object for the given key. |
|
protected int |
getChildPageCount(Page p)
Get the child page count for this page. |
|
protected Page |
getPage(SpatialKey key)
Get the page for the given value. |
|
java.lang.String |
getType()
Get the map type. |
|
boolean |
isQuadraticSplit()
|
|
V |
put(SpatialKey key,
V value)
Add or replace a key-value pair. |
|
protected java.lang.Object |
remove(Page p,
long writeVersion,
java.lang.Object key)
Remove a key-value pair. |
|
void |
setQuadraticSplit(boolean quadraticSplit)
|
Methods inherited from class org.h2.mvstore.MVMap |
---|
afterWrite, areValuesEqual, beforeWrite, binarySearch, binarySearchPage, ceilingKey, checkConcurrentWrite, clear, containsKey, copyOnWrite, cursor, entrySet, equals, firstKey, floorKey, getCreateVersion, getFirstLast, getId, getKey, getKeyIndex, getKeyType, getMinMax, getName, getRoot, getStore, getValueType, getVersion, hashCode, higherKey, init, isClosed, isEmpty, isReadOnly, keyIterator, keyList, keySet, lastKey, lowerKey, newRoot, openVersion, put, putIfAbsent, remove, remove, removePage, replace, replace, size, sizeAsLong, splitRootIfNeeded, toString, waitUntilWritten |
Methods inherited from class java.util.AbstractMap |
---|
clone, containsValue, putAll, values |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
containsValue, putAll, values |
Constructor Detail |
---|
public MVRTreeMap(int dimensions, DataType valueType)
Method Detail |
---|
public static <V> MVRTreeMap<V> create(int dimensions, DataType valueType)
V
- the value typedimensions
- the number of dimensionsvalueType
- the value type
public V get(java.lang.Object key)
MVMap
get
in interface java.util.Map<SpatialKey,V>
get
in class MVMap<SpatialKey,V>
key
- the key
public MVRTreeMap.RTreeCursor findIntersectingKeys(SpatialKey x)
x
- the rectangle
public MVRTreeMap.RTreeCursor findContainedKeys(SpatialKey x)
x
- the rectangle
protected java.lang.Object get(Page p, java.lang.Object key)
p
- the pagekey
- the key
protected Page getPage(SpatialKey key)
MVMap
getPage
in class MVMap<SpatialKey,V>
key
- the key
protected java.lang.Object remove(Page p, long writeVersion, java.lang.Object key)
MVMap
remove
in class MVMap<SpatialKey,V>
p
- the page (may not be null)writeVersion
- the write versionkey
- the key
public V put(SpatialKey key, V value)
MVMap
put
in interface java.util.Map<SpatialKey,V>
put
in class MVMap<SpatialKey,V>
key
- the key (may not be null)value
- the value (may not be null)
public void add(SpatialKey key, V value)
key
- the keyvalue
- the valuepublic void addNodeKeys(java.util.ArrayList<SpatialKey> list, Page p)
list
- the listp
- the root pagepublic boolean isQuadraticSplit()
public void setQuadraticSplit(boolean quadraticSplit)
protected int getChildPageCount(Page p)
MVMap
getChildPageCount
in class MVMap<SpatialKey,V>
p
- the page
public java.lang.String getType()
MVMap
getType
in class MVMap<SpatialKey,V>
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |