- 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>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Chunkcommit(Commit commit)voidcommitAsync(Commit commit)Comparator<? super swim.structure.Value>comparator()booleancontainsKey(Object key)booleancontainsValue(Object value)Databasedatabase()swim.util.Cursor<swim.structure.Value>depthValueIterator(int maxDepth)protected voiddidFail(StoreException error)voiddrop(int lower)swim.structure.SlotfirstEntry()swim.structure.ValuefirstKey()swim.structure.ValuefirstValue()swim.structure.Valueget(Object key)swim.structure.SlotgetEntry(Object key)swim.structure.SlotgetIndex(int index)swim.structure.SlotgetIndex(long index)intindexOf(Object key)booleanisEmpty()booleanisResident()BTreeMapisResident(boolean isResident)booleanisTransient()BTreeMapisTransient(boolean isTransient)swim.util.OrderedMapCursor<swim.structure.Value,swim.structure.Value>iterator()<K> swim.structure.collections.ValueMap<K,swim.structure.Value>keyClass(Class<K> keyClass)<K> swim.structure.collections.ValueMap<K,swim.structure.Value>keyForm(swim.structure.Form<K> keyForm)swim.util.Cursor<swim.structure.Value>keyIterator()swim.structure.SlotlastEntry()swim.structure.ValuelastKey()swim.structure.ValuelastValue()BTreeMapload()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)voidputAll(Map<? extends swim.structure.Value,? extends swim.structure.Value> map)swim.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.Valueremove(Object key)StoreSettingssettings()voidsetTreeDelegate(TreeDelegate treeDelegate)intsize()BTreeMapViewsnapshot()longspan()voidtake(int upper)BTreetree()TreeDelegatetreeDelegate()longtreeSize()Trunk<BTree>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>valueIterator()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
-
-
Method Detail
-
settings
public final StoreSettings settings()
-
database
public final Database database()
-
name
public final swim.structure.Value name()
-
tree
public final BTree tree()
-
treeDelegate
public final TreeDelegate treeDelegate()
-
setTreeDelegate
public void setTreeDelegate(TreeDelegate treeDelegate)
-
isResident
public boolean isResident()
-
isResident
public BTreeMap isResident(boolean isResident)
-
isTransient
public boolean isTransient()
-
isTransient
public BTreeMap isTransient(boolean isTransient)
-
keyForm
public <K> swim.structure.collections.ValueMap<K,swim.structure.Value> keyForm(swim.structure.Form<K> keyForm)
-
keyClass
public <K> swim.structure.collections.ValueMap<K,swim.structure.Value> keyClass(Class<K> 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
public BTreeMapView snapshot()
-
isEmpty
public boolean isEmpty()
-
size
public int size()
-
span
public long span()
-
treeSize
public long treeSize()
-
containsKey
public boolean containsKey(Object key)
- 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
public boolean containsValue(Object value)
- 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
public int indexOf(Object key)
- Specified by:
indexOfin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
get
public swim.structure.Value get(Object key)
-
getEntry
public swim.structure.Slot getEntry(Object key)
- 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
public void putAll(Map<? extends swim.structure.Value,? extends swim.structure.Value> map)
-
remove
public swim.structure.Value remove(Object key)
-
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()
- Specified by:
iteratorin interfaceIterable<Map.Entry<swim.structure.Value,swim.structure.Value>>- Specified by:
iteratorin interfaceswim.util.IterableMap<swim.structure.Value,swim.structure.Value>- Specified by:
iteratorin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>
-
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
protected void didFail(StoreException error)
-
load
public BTreeMap load()
-
commitAsync
public void commitAsync(Commit commit)
-
commit
public Chunk commit(Commit commit) throws InterruptedException
- Throws:
InterruptedException
-
comparator
public Comparator<? super swim.structure.Value> comparator()
- Specified by:
comparatorin interfaceswim.util.OrderedMap<swim.structure.Value,swim.structure.Value>- Specified by:
comparatorin interfaceSortedMap<swim.structure.Value,swim.structure.Value>
-
-