jdbm
Interface PrimaryTreeMap<K,V>
- Type Parameters:
K
- key typeV
- value type
- All Superinterfaces:
- JdbmBase<K,V>, java.util.Map<K,V>, PrimaryMap<K,V>, java.util.SortedMap<K,V>
- All Known Implementing Classes:
- BTreeSecondarySortedMap, BTreeSortedMap
public interface PrimaryTreeMap<K,V>
- extends PrimaryMap<K,V>, java.util.SortedMap<K,V>
Primary HashMap which persist data in storage.
Behavior is very similar to java.util.HashMap/code>, this map also uses b-tree index to lookup keys
But it adds some methods to create secondary views
Performance note: keys and values are stored as part of index nodes.
They are deserialized on each index lookup.
This may lead to performance degradation and OutOfMemoryExceptions.
If your values are big (>500 bytes) you may consider using PrimaryStoreMap
or to minimalize size of index.
- Author:
- Jan Kotek
Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
Method Summary |
java.lang.Integer |
newIntegerKey()
In case primary key is Integer, new unique Key is generated, otherwise exception is thrown |
java.lang.Long |
newLongKey()
In case primary key is Long, new unique Key is generated, otherwise exception is thrown |
Methods inherited from interface jdbm.PrimaryMap |
inverseHashView, secondaryHashMap, secondaryHashMap, secondaryHashMapManyToOne, secondaryHashMapManyToOne, secondaryTreeMap, secondaryTreeMap, secondaryTreeMap, secondaryTreeMap, secondaryTreeMapManyToOne, secondaryTreeMapManyToOne, secondaryTreeMapManyToOne, secondaryTreeMapManyToOne |
Methods inherited from interface java.util.SortedMap |
comparator, entrySet, firstKey, headMap, keySet, lastKey, subMap, tailMap, values |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, equals, get, hashCode, isEmpty, put, putAll, remove, size |
newLongKey
java.lang.Long newLongKey()
- In case primary key is Long, new unique Key is generated, otherwise exception is thrown
- Type Parameters:
K
-
newIntegerKey
java.lang.Integer newIntegerKey()
- In case primary key is Integer, new unique Key is generated, otherwise exception is thrown
- Type Parameters:
K
-
Cees de Groot (C) 2000. All rights reserved http://jdbm.sourceforge.net