Module swim.db
Package swim.db

Class 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>
    • Constructor Detail

      • BTreeMap

        public BTreeMap​(Trunk<BTree> trunk)
    • Method Detail

      • database

        public final Database database()
      • name

        public final swim.structure.Value name()
      • tree

        public final BTree tree()
      • 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)
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface swim.util.IterableMap<swim.structure.Value,​swim.structure.Value>
        Specified by:
        isEmpty in interface Map<swim.structure.Value,​swim.structure.Value>
        Specified by:
        isEmpty in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • size

        public int size()
        Specified by:
        size in interface swim.util.IterableMap<swim.structure.Value,​swim.structure.Value>
        Specified by:
        size in interface Map<swim.structure.Value,​swim.structure.Value>
        Specified by:
        size in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • span

        public long span()
      • treeSize

        public long treeSize()
      • containsKey

        public boolean containsKey​(Object key)
        Specified by:
        containsKey in interface swim.util.IterableMap<swim.structure.Value,​swim.structure.Value>
        Specified by:
        containsKey in interface Map<swim.structure.Value,​swim.structure.Value>
        Specified by:
        containsKey in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • containsValue

        public boolean containsValue​(Object value)
        Specified by:
        containsValue in interface swim.util.IterableMap<swim.structure.Value,​swim.structure.Value>
        Specified by:
        containsValue in interface Map<swim.structure.Value,​swim.structure.Value>
        Specified by:
        containsValue in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • indexOf

        public int indexOf​(Object key)
        Specified by:
        indexOf in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • get

        public swim.structure.Value get​(Object key)
        Specified by:
        get in interface swim.util.IterableMap<swim.structure.Value,​swim.structure.Value>
        Specified by:
        get in interface Map<swim.structure.Value,​swim.structure.Value>
        Specified by:
        get in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • getEntry

        public swim.structure.Slot getEntry​(Object key)
        Specified by:
        getEntry in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • getIndex

        public swim.structure.Slot getIndex​(int index)
        Specified by:
        getIndex in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • getIndex

        public swim.structure.Slot getIndex​(long index)
      • firstEntry

        public swim.structure.Slot firstEntry()
        Specified by:
        firstEntry in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • firstKey

        public swim.structure.Value firstKey()
        Specified by:
        firstKey in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
        Specified by:
        firstKey in interface SortedMap<swim.structure.Value,​swim.structure.Value>
      • firstValue

        public swim.structure.Value firstValue()
        Specified by:
        firstValue in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • lastEntry

        public swim.structure.Slot lastEntry()
        Specified by:
        lastEntry in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • lastKey

        public swim.structure.Value lastKey()
        Specified by:
        lastKey in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
        Specified by:
        lastKey in interface SortedMap<swim.structure.Value,​swim.structure.Value>
      • lastValue

        public swim.structure.Value lastValue()
        Specified by:
        lastValue in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • nextEntry

        public swim.structure.Slot nextEntry​(swim.structure.Value key)
        Specified by:
        nextEntry in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • nextKey

        public swim.structure.Value nextKey​(swim.structure.Value key)
        Specified by:
        nextKey in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • nextValue

        public swim.structure.Value nextValue​(swim.structure.Value key)
        Specified by:
        nextValue in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • previousEntry

        public swim.structure.Slot previousEntry​(swim.structure.Value key)
        Specified by:
        previousEntry in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • previousKey

        public swim.structure.Value previousKey​(swim.structure.Value key)
        Specified by:
        previousKey in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • previousValue

        public swim.structure.Value previousValue​(swim.structure.Value key)
        Specified by:
        previousValue in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • put

        public swim.structure.Value put​(swim.structure.Value key,
                                        swim.structure.Value newValue)
        Specified by:
        put in interface swim.util.IterableMap<swim.structure.Value,​swim.structure.Value>
        Specified by:
        put in interface Map<swim.structure.Value,​swim.structure.Value>
        Specified by:
        put in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • putAll

        public void putAll​(Map<? extends swim.structure.Value,​? extends swim.structure.Value> map)
        Specified by:
        putAll in interface swim.util.IterableMap<swim.structure.Value,​swim.structure.Value>
        Specified by:
        putAll in interface Map<swim.structure.Value,​swim.structure.Value>
        Specified by:
        putAll in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • remove

        public swim.structure.Value remove​(Object key)
        Specified by:
        remove in interface swim.util.IterableMap<swim.structure.Value,​swim.structure.Value>
        Specified by:
        remove in interface Map<swim.structure.Value,​swim.structure.Value>
        Specified by:
        remove in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • drop

        public void drop​(int lower)
      • take

        public void take​(int upper)
      • clear

        public void clear()
        Specified by:
        clear in interface swim.util.IterableMap<swim.structure.Value,​swim.structure.Value>
        Specified by:
        clear in interface Map<swim.structure.Value,​swim.structure.Value>
        Specified by:
        clear in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • 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:
        reduced in interface swim.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:
        iterator in interface Iterable<Map.Entry<swim.structure.Value,​swim.structure.Value>>
        Specified by:
        iterator in interface swim.util.IterableMap<swim.structure.Value,​swim.structure.Value>
        Specified by:
        iterator in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • keyIterator

        public swim.util.Cursor<swim.structure.Value> keyIterator()
        Specified by:
        keyIterator in interface swim.util.IterableMap<swim.structure.Value,​swim.structure.Value>
        Specified by:
        keyIterator in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • valueIterator

        public swim.util.Cursor<swim.structure.Value> valueIterator()
        Specified by:
        valueIterator in interface swim.util.IterableMap<swim.structure.Value,​swim.structure.Value>
        Specified by:
        valueIterator in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
      • depthValueIterator

        public swim.util.Cursor<swim.structure.Value> depthValueIterator​(int maxDepth)
      • loadAsync

        public void loadAsync​(swim.concurrent.Cont<BTreeMap> cont)
      • commitAsync

        public void commitAsync​(Commit commit)
      • comparator

        public Comparator<? super swim.structure.Value> comparator()
        Specified by:
        comparator in interface swim.util.OrderedMap<swim.structure.Value,​swim.structure.Value>
        Specified by:
        comparator in interface SortedMap<swim.structure.Value,​swim.structure.Value>