public class BTreeIndex<Key,Value> extends Object implements SortedIndex<Key,Value>
Constructor and Description |
---|
BTreeIndex(Paged paged,
int page,
BTreeIndexFactory<Key,Value> factory) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
clear the index
|
boolean |
containsKey(Key key) |
void |
create() |
void |
destroy()
Frees any extra storage that the index created.
|
Value |
get(Key key) |
Comparator |
getComparator() |
Map.Entry<Key,Value> |
getFirst() |
int |
getIndexLocation() |
org.fusesource.hawtbuf.codec.Codec<Key> |
getKeyMarshaller() |
Map.Entry<Key,Value> |
getLast() |
int |
getMaxLeafDepth() |
int |
getMinLeafDepth() |
Paged |
getPaged() |
Prefixer<Key> |
getPrefixer() |
org.fusesource.hawtbuf.codec.Codec<Value> |
getValueMarshaller() |
boolean |
isEmpty() |
Iterator<Map.Entry<Key,Value>> |
iterator() |
Iterator<Map.Entry<Key,Value>> |
iterator(Key initialKey) |
Iterator<Map.Entry<Key,Value>> |
iterator(Predicate<Key> predicate) |
void |
printStructure(OutputStream out) |
void |
printStructure(PrintWriter out) |
Value |
put(Key key,
Value value)
store the key, item
|
Value |
putIfAbsent(Key key,
Value value)
get the value at the given key, or put it if null.
|
Value |
remove(Key key)
remove the index key
|
int |
size() |
String |
toString() |
void |
visit(IndexVisitor<Key,Value> visitor)
Traverses the visitor over the stored entries in this index.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public BTreeIndex(Paged paged, int page, BTreeIndexFactory<Key,Value> factory)
public void create()
public boolean containsKey(Key key)
containsKey
in interface Index<Key,Value>
public Value put(Key key, Value value)
Index
public Value putIfAbsent(Key key, Value value)
Index
putIfAbsent
in interface Index<Key,Value>
public void clear()
Index
public int getMinLeafDepth()
public int getMaxLeafDepth()
public void printStructure(PrintWriter out)
public void printStructure(OutputStream out)
public Iterator<Map.Entry<Key,Value>> iterator(Predicate<Key> predicate)
iterator
in interface SortedIndex<Key,Value>
public Iterator<Map.Entry<Key,Value>> iterator(Key initialKey)
iterator
in interface SortedIndex<Key,Value>
public void visit(IndexVisitor<Key,Value> visitor)
SortedIndex
visit
in interface SortedIndex<Key,Value>
public Map.Entry<Key,Value> getFirst()
getFirst
in interface SortedIndex<Key,Value>
public Map.Entry<Key,Value> getLast()
getLast
in interface SortedIndex<Key,Value>
public Paged getPaged()
public int getIndexLocation()
getIndexLocation
in interface Index<Key,Value>
public org.fusesource.hawtbuf.codec.Codec<Key> getKeyMarshaller()
public org.fusesource.hawtbuf.codec.Codec<Value> getValueMarshaller()
public Comparator getComparator()
Copyright © 2009–2016 FuseSource, Corp.. All rights reserved.