public class BTreeIndex<Key,Value> extends Object implements Index<Key,Value>
Modifier and Type | Class and Description |
---|---|
static interface |
BTreeIndex.Prefixer<Key>
Interface used to determine the simple prefix of two keys.
|
static class |
BTreeIndex.StringPrefixer
StringPrefixer is a Prefixer implementation that works on strings.
|
Constructor and Description |
---|
BTreeIndex() |
BTreeIndex(long rootPageId) |
BTreeIndex(Page page) |
BTreeIndex(PageFile pageFile,
long rootPageId) |
BTreeIndex(PageFile pageFile,
Page page) |
public BTreeIndex()
public BTreeIndex(long rootPageId)
public BTreeIndex(Page page)
public BTreeIndex(PageFile pageFile, long rootPageId)
public BTreeIndex(PageFile pageFile, Page page)
public void load(Transaction tx) throws IOException
Index
load
in interface Index<Key,Value>
IOException
public void unload(Transaction tx)
Index
public boolean containsKey(Transaction tx, Key key) throws IOException
containsKey
in interface Index<Key,Value>
IOException
public Value get(Transaction tx, Key key) throws IOException
get
in interface Index<Key,Value>
IOException
public Value put(Transaction tx, Key key, Value value) throws IOException
Index
put
in interface Index<Key,Value>
IOException
public Value remove(Transaction tx, Key key) throws IOException
Index
remove
in interface Index<Key,Value>
IOException
public boolean isTransient()
isTransient
in interface Index<Key,Value>
public void clear(Transaction tx) throws IOException
Index
clear
in interface Index<Key,Value>
IOException
public int getMinLeafDepth(Transaction tx) throws IOException
IOException
public int getMaxLeafDepth(Transaction tx) throws IOException
IOException
public void printStructure(Transaction tx, PrintWriter out) throws IOException
IOException
public void printStructure(Transaction tx, OutputStream out) throws IOException
IOException
public boolean isEmpty(Transaction tx) throws IOException
IOException
public Iterator<Map.Entry<Key,Value>> iterator(Transaction tx) throws IOException
iterator
in interface Index<Key,Value>
IOException
public Iterator<Map.Entry<Key,Value>> iterator(Transaction tx, Key initialKey) throws IOException
IOException
public Iterator<Map.Entry<Key,Value>> iterator(Transaction tx, Key initialKey, Key maxKey) throws IOException
IOException
public void visit(Transaction tx, BTreeVisitor<Key,Value> visitor) throws IOException
IOException
public Map.Entry<Key,Value> getFirst(Transaction tx) throws IOException
IOException
public Map.Entry<Key,Value> getLast(Transaction tx) throws IOException
IOException
public PageFile getPageFile()
public long getPageId()
public Marshaller<Key> getKeyMarshaller()
public void setKeyMarshaller(Marshaller<Key> keyMarshaller)
Index
setKeyMarshaller
in interface Index<Key,Value>
public Marshaller<Value> getValueMarshaller()
public void setValueMarshaller(Marshaller<Value> valueMarshaller)
Index
setValueMarshaller
in interface Index<Key,Value>
public BTreeIndex.Prefixer<Key> getPrefixer()
public void setPrefixer(BTreeIndex.Prefixer<Key> prefixer)
public void setPageFile(PageFile pageFile)
public void setPageId(long pageId)
Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.