java.lang.Object
swim.db.BTreeMap
- All Implemented Interfaces:
Iterable<Map.Entry<Value,,Value>> Map<Value,,Value> SortedMap<Value,,Value> IterableMap<Value,,Value> OrderedMap<Value,,Value> ReducedMap<Value,Value, Value>
public class BTreeMap
extends Object
implements OrderedMap<Value,Value>, ReducedMap<Value,Value,Value>
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()voidcommitAsync(Commit commit) Comparator<? super Value>booleancontainsKey(Object key) booleancontainsValue(Object value) final Databasedatabase()depthValueIterator(int maxDepth) protected voiddidFail(StoreException error) voiddrop(int lower) firstKey()getIndex(int index) getIndex(long index) intbooleanisEmpty()booleanisResident(boolean isResident) booleanisTransient(boolean isTransient) iterator()lastKey()load()final Valuename()previousEntry(Value key) previousKey(Value key) previousValue(Value key) voidreduced(Value identity, CombinerFunction<? super Value, Value> accumulator, CombinerFunction<Value, Value> combiner) Returns the reduction of thisReducedMap, combining all contained elements with the givenaccumulatorandcombinerfunctions, recomputing only what has changed since the last invocation ofreduced.final StoreSettingssettings()voidsetTreeDelegate(TreeDelegate treeDelegate) intsize()snapshot()longspan()voidtake(int upper) final BTreetree()final TreeDelegatelongtreeSize()trunk()valueClass(Class<V> valueClass) 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, replaceAll
-
Constructor Details
-
BTreeMap
-
-
Method Details
-
trunk
-
settings
-
database
-
name
-
tree
-
treeDelegate
-
setTreeDelegate
-
isResident
public boolean isResident() -
isResident
-
isTransient
public boolean isTransient() -
isTransient
-
keyForm
-
keyClass
-
valueForm
-
valueClass
-
snapshot
-
isEmpty
public boolean isEmpty() -
size
public int size() -
span
public long span() -
treeSize
public long treeSize() -
containsKey
- Specified by:
containsKeyin interfaceIterableMap<Value,Value> - Specified by:
containsKeyin interfaceMap<Value,Value> - Specified by:
containsKeyin interfaceOrderedMap<Value,Value>
-
containsValue
- Specified by:
containsValuein interfaceIterableMap<Value,Value> - Specified by:
containsValuein interfaceMap<Value,Value> - Specified by:
containsValuein interfaceOrderedMap<Value,Value>
-
indexOf
- Specified by:
indexOfin interfaceOrderedMap<Value,Value>
-
get
-
getEntry
- Specified by:
getEntryin interfaceOrderedMap<Value,Value>
-
getIndex
- Specified by:
getIndexin interfaceOrderedMap<Value,Value>
-
getIndex
-
firstEntry
- Specified by:
firstEntryin interfaceOrderedMap<Value,Value>
-
firstKey
-
firstValue
- Specified by:
firstValuein interfaceOrderedMap<Value,Value>
-
lastEntry
- Specified by:
lastEntryin interfaceOrderedMap<Value,Value>
-
lastKey
-
lastValue
- Specified by:
lastValuein interfaceOrderedMap<Value,Value>
-
nextEntry
- Specified by:
nextEntryin interfaceOrderedMap<Value,Value>
-
nextKey
- Specified by:
nextKeyin interfaceOrderedMap<Value,Value>
-
nextValue
- Specified by:
nextValuein interfaceOrderedMap<Value,Value>
-
previousEntry
- Specified by:
previousEntryin interfaceOrderedMap<Value,Value>
-
previousKey
- Specified by:
previousKeyin interfaceOrderedMap<Value,Value>
-
previousValue
- Specified by:
previousValuein interfaceOrderedMap<Value,Value>
-
put
-
putAll
-
remove
-
drop
public void drop(int lower) -
take
public void take(int upper) -
clear
public void clear() -
reduced
public Value reduced(Value identity, CombinerFunction<? super Value, Value> accumulator, CombinerFunction<Value, Value> combiner) Description copied from interface:ReducedMapReturns the reduction of thisReducedMap, combining all contained elements with the givenaccumulatorandcombinerfunctions, recomputing only what has changed since the last invocation ofreduced. Stores partial computations to accelerate repeated reduction of continuously mutating datasets.- Specified by:
reducedin interfaceReducedMap<Value,Value, Value>
-
iterator
-
keyIterator
- Specified by:
keyIteratorin interfaceIterableMap<Value,Value> - Specified by:
keyIteratorin interfaceOrderedMap<Value,Value>
-
valueIterator
- Specified by:
valueIteratorin interfaceIterableMap<Value,Value> - Specified by:
valueIteratorin interfaceOrderedMap<Value,Value>
-
depthValueIterator
-
didFail
-
load
-
commitAsync
-
commit
- Throws:
InterruptedException
-
comparator
- Specified by:
comparatorin interfaceOrderedMap<Value,Value> - Specified by:
comparatorin interfaceSortedMap<Value,Value>
-