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 TypeMethodDescriptionvoid
clear()
void
commitAsync
(Commit commit) Comparator<? super Value>
boolean
containsKey
(Object key) boolean
containsValue
(Object value) final Database
database()
depthValueIterator
(int maxDepth) protected void
didFail
(StoreException error) void
drop
(int lower) firstKey()
getIndex
(int index) getIndex
(long index) int
boolean
isEmpty()
boolean
isResident
(boolean isResident) boolean
isTransient
(boolean isTransient) iterator()
lastKey()
load()
final Value
name()
previousEntry
(Value key) previousKey
(Value key) previousValue
(Value key) void
reduced
(Value identity, CombinerFunction<? super Value, Value> accumulator, CombinerFunction<Value, Value> combiner) Returns the reduction of thisReducedMap
, combining all contained elements with the givenaccumulator
andcombiner
functions, recomputing only what has changed since the last invocation ofreduced
.final StoreSettings
settings()
void
setTreeDelegate
(TreeDelegate treeDelegate) int
size()
snapshot()
long
span()
void
take
(int upper) final BTree
tree()
final TreeDelegate
long
treeSize()
trunk()
valueClass
(Class<V> valueClass) 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
-
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:
containsKey
in interfaceIterableMap<Value,
Value> - Specified by:
containsKey
in interfaceMap<Value,
Value> - Specified by:
containsKey
in interfaceOrderedMap<Value,
Value>
-
containsValue
- Specified by:
containsValue
in interfaceIterableMap<Value,
Value> - Specified by:
containsValue
in interfaceMap<Value,
Value> - Specified by:
containsValue
in interfaceOrderedMap<Value,
Value>
-
indexOf
- Specified by:
indexOf
in interfaceOrderedMap<Value,
Value>
-
get
-
getEntry
- Specified by:
getEntry
in interfaceOrderedMap<Value,
Value>
-
getIndex
- Specified by:
getIndex
in interfaceOrderedMap<Value,
Value>
-
getIndex
-
firstEntry
- Specified by:
firstEntry
in interfaceOrderedMap<Value,
Value>
-
firstKey
-
firstValue
- Specified by:
firstValue
in interfaceOrderedMap<Value,
Value>
-
lastEntry
- Specified by:
lastEntry
in interfaceOrderedMap<Value,
Value>
-
lastKey
-
lastValue
- Specified by:
lastValue
in interfaceOrderedMap<Value,
Value>
-
nextEntry
- Specified by:
nextEntry
in interfaceOrderedMap<Value,
Value>
-
nextKey
- Specified by:
nextKey
in interfaceOrderedMap<Value,
Value>
-
nextValue
- Specified by:
nextValue
in interfaceOrderedMap<Value,
Value>
-
previousEntry
- Specified by:
previousEntry
in interfaceOrderedMap<Value,
Value>
-
previousKey
- Specified by:
previousKey
in interfaceOrderedMap<Value,
Value>
-
previousValue
- Specified by:
previousValue
in 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:ReducedMap
Returns the reduction of thisReducedMap
, combining all contained elements with the givenaccumulator
andcombiner
functions, recomputing only what has changed since the last invocation ofreduced
. Stores partial computations to accelerate repeated reduction of continuously mutating datasets.- Specified by:
reduced
in interfaceReducedMap<Value,
Value, Value>
-
iterator
-
keyIterator
- Specified by:
keyIterator
in interfaceIterableMap<Value,
Value> - Specified by:
keyIterator
in interfaceOrderedMap<Value,
Value>
-
valueIterator
- Specified by:
valueIterator
in interfaceIterableMap<Value,
Value> - Specified by:
valueIterator
in interfaceOrderedMap<Value,
Value>
-
depthValueIterator
-
didFail
-
load
-
commitAsync
-
commit
- Throws:
InterruptedException
-
comparator
- Specified by:
comparator
in interfaceOrderedMap<Value,
Value> - Specified by:
comparator
in interfaceSortedMap<Value,
Value>
-