java.lang.Object
swim.db.BTreeMap
- All Implemented Interfaces:
Iterable<Map.Entry<swim.structure.Value,,swim.structure.Value>> Map<swim.structure.Value,,swim.structure.Value> SortedMap<swim.structure.Value,,swim.structure.Value> swim.util.IterableMap<swim.structure.Value,,swim.structure.Value> swim.util.OrderedMap<swim.structure.Value,,swim.structure.Value> swim.util.ReducedMap<swim.structure.Value,swim.structure.Value, swim.structure.Value>
public class BTreeMap
extends Object
implements swim.util.OrderedMap<swim.structure.Value,swim.structure.Value>, swim.util.ReducedMap<swim.structure.Value,swim.structure.Value,swim.structure.Value>
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidcommitAsync(Commit commit) Comparator<? super swim.structure.Value>booleancontainsKey(Object key) booleancontainsValue(Object value) final Databasedatabase()swim.util.Cursor<swim.structure.Value>depthValueIterator(int maxDepth) protected voiddidFail(StoreException error) voiddrop(int lower) swim.structure.Slotswim.structure.ValuefirstKey()swim.structure.Valueswim.structure.Valueswim.structure.Slotswim.structure.SlotgetIndex(int index) swim.structure.SlotgetIndex(long index) intbooleanisEmpty()booleanisResident(boolean isResident) booleanisTransient(boolean isTransient) swim.util.OrderedMapCursor<swim.structure.Value,swim.structure.Value> iterator()<K> swim.structure.collections.ValueMap<K,swim.structure.Value> <K> swim.structure.collections.ValueMap<K,swim.structure.Value> keyForm(swim.structure.Form<K> keyForm) swim.util.Cursor<swim.structure.Value>swim.structure.Slotswim.structure.ValuelastKey()swim.structure.Valueload()final swim.structure.Valuename()swim.structure.SlotnextEntry(swim.structure.Value key) swim.structure.ValuenextKey(swim.structure.Value key) swim.structure.ValuenextValue(swim.structure.Value key) swim.structure.SlotpreviousEntry(swim.structure.Value key) swim.structure.ValuepreviousKey(swim.structure.Value key) swim.structure.ValuepreviousValue(swim.structure.Value key) swim.structure.Valueput(swim.structure.Value key, swim.structure.Value newValue) voidswim.structure.Valuereduced(swim.structure.Value identity, swim.util.CombinerFunction<? super swim.structure.Value, swim.structure.Value> accumulator, swim.util.CombinerFunction<swim.structure.Value, swim.structure.Value> combiner) swim.structure.Valuefinal StoreSettingssettings()voidsetTreeDelegate(TreeDelegate treeDelegate) intsize()snapshot()longspan()voidtake(int upper) final BTreetree()final TreeDelegatelongtreeSize()trunk()<V> swim.structure.collections.ValueMap<swim.structure.Value,V> valueClass(Class<V> valueClass) <V> swim.structure.collections.ValueMap<swim.structure.Value,V> valueForm(swim.structure.Form<V> valueForm) swim.util.Cursor<swim.structure.Value>Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllMethods inherited from interface swim.util.OrderedMap
entrySet, headMap, keySet, subMap, tailMap, values
-
Constructor Details
-
BTreeMap
-
-
Method Details
-
trunk
-
settings
-
database
-
name
public final swim.structure.Value name() -
tree
-
treeDelegate
-
setTreeDelegate
-
isResident
public boolean isResident() -
isResident
-
isTransient
public boolean isTransient() -
isTransient
-
keyForm
public <K> swim.structure.collections.ValueMap<K,swim.structure.Value> keyForm(swim.structure.Form<K> keyForm) -
keyClass
-
valueForm
public <V> swim.structure.collections.ValueMap<swim.structure.Value,V> valueForm(swim.structure.Form<V> valueForm) -
valueClass
public <V> swim.structure.collections.ValueMap<swim.structure.Value,V> valueClass(Class<V> valueClass) -
snapshot
-
isEmpty
public boolean isEmpty() -
size
public int size() -
span
public long span() -
treeSize
public long treeSize() -
containsKey
- Specified by:
containsKeyin interfaceswim.util.IterableMap<swim.structure.Value,swim.structure.Value> - Specified by:
containsKeyin interfaceMap<swim.structure.Value,swim.structure.Value> - Specified by:
containsKeyin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
containsValue
- Specified by:
containsValuein interfaceswim.util.IterableMap<swim.structure.Value,swim.structure.Value> - Specified by:
containsValuein interfaceMap<swim.structure.Value,swim.structure.Value> - Specified by:
containsValuein interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
indexOf
- Specified by:
indexOfin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
get
-
getEntry
- Specified by:
getEntryin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
getIndex
public swim.structure.Slot getIndex(int index) - Specified by:
getIndexin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
getIndex
public swim.structure.Slot getIndex(long index) -
firstEntry
public swim.structure.Slot firstEntry()- Specified by:
firstEntryin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
firstKey
public swim.structure.Value firstKey() -
firstValue
public swim.structure.Value firstValue()- Specified by:
firstValuein interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
lastEntry
public swim.structure.Slot lastEntry()- Specified by:
lastEntryin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
lastKey
public swim.structure.Value lastKey() -
lastValue
public swim.structure.Value lastValue()- Specified by:
lastValuein interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
nextEntry
public swim.structure.Slot nextEntry(swim.structure.Value key) - Specified by:
nextEntryin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
nextKey
public swim.structure.Value nextKey(swim.structure.Value key) - Specified by:
nextKeyin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
nextValue
public swim.structure.Value nextValue(swim.structure.Value key) - Specified by:
nextValuein interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
previousEntry
public swim.structure.Slot previousEntry(swim.structure.Value key) - Specified by:
previousEntryin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
previousKey
public swim.structure.Value previousKey(swim.structure.Value key) - Specified by:
previousKeyin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
previousValue
public swim.structure.Value previousValue(swim.structure.Value key) - Specified by:
previousValuein interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
put
public swim.structure.Value put(swim.structure.Value key, swim.structure.Value newValue) -
putAll
-
remove
-
drop
public void drop(int lower) -
take
public void take(int upper) -
clear
public void clear() -
reduced
public swim.structure.Value reduced(swim.structure.Value identity, swim.util.CombinerFunction<? super swim.structure.Value, swim.structure.Value> accumulator, swim.util.CombinerFunction<swim.structure.Value, swim.structure.Value> combiner) - Specified by:
reducedin interfaceswim.util.ReducedMap<swim.structure.Value,swim.structure.Value, swim.structure.Value>
-
iterator
public swim.util.OrderedMapCursor<swim.structure.Value,swim.structure.Value> iterator() -
keyIterator
public swim.util.Cursor<swim.structure.Value> keyIterator()- Specified by:
keyIteratorin interfaceswim.util.IterableMap<swim.structure.Value,swim.structure.Value> - Specified by:
keyIteratorin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
valueIterator
public swim.util.Cursor<swim.structure.Value> valueIterator()- Specified by:
valueIteratorin interfaceswim.util.IterableMap<swim.structure.Value,swim.structure.Value> - Specified by:
valueIteratorin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
depthValueIterator
public swim.util.Cursor<swim.structure.Value> depthValueIterator(int maxDepth) -
didFail
-
load
-
commitAsync
-
commit
- Throws:
InterruptedException
-
comparator
- Specified by:
comparatorin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value> - Specified by:
comparatorin interfaceSortedMap<swim.structure.Value,swim.structure.Value>
-