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
Indexload in interface Index<Key,Value>IOExceptionpublic void unload(Transaction tx)
Indexpublic boolean containsKey(Transaction tx, Key key) throws IOException
containsKey in interface Index<Key,Value>IOExceptionpublic Value get(Transaction tx, Key key) throws IOException
get in interface Index<Key,Value>IOExceptionpublic Value put(Transaction tx, Key key, Value value) throws IOException
Indexput in interface Index<Key,Value>IOExceptionpublic Value remove(Transaction tx, Key key) throws IOException
Indexremove in interface Index<Key,Value>IOExceptionpublic boolean isTransient()
isTransient in interface Index<Key,Value>public void clear(Transaction tx) throws IOException
Indexclear in interface Index<Key,Value>IOExceptionpublic int getMinLeafDepth(Transaction tx) throws IOException
IOExceptionpublic int getMaxLeafDepth(Transaction tx) throws IOException
IOExceptionpublic void printStructure(Transaction tx, PrintWriter out) throws IOException
IOExceptionpublic void printStructure(Transaction tx, OutputStream out) throws IOException
IOExceptionpublic boolean isEmpty(Transaction tx) throws IOException
IOExceptionpublic Iterator<Map.Entry<Key,Value>> iterator(Transaction tx) throws IOException
iterator in interface Index<Key,Value>IOExceptionpublic Iterator<Map.Entry<Key,Value>> iterator(Transaction tx, Key initialKey) throws IOException
IOExceptionpublic Iterator<Map.Entry<Key,Value>> iterator(Transaction tx, Key initialKey, Key maxKey) throws IOException
IOExceptionpublic void visit(Transaction tx, BTreeVisitor<Key,Value> visitor) throws IOException
IOExceptionpublic Map.Entry<Key,Value> getFirst(Transaction tx) throws IOException
IOExceptionpublic Map.Entry<Key,Value> getLast(Transaction tx) throws IOException
IOExceptionpublic PageFile getPageFile()
public long getPageId()
public Marshaller<Key> getKeyMarshaller()
public void setKeyMarshaller(Marshaller<Key> keyMarshaller)
IndexsetKeyMarshaller in interface Index<Key,Value>public Marshaller<Value> getValueMarshaller()
public void setValueMarshaller(Marshaller<Value> valueMarshaller)
IndexsetValueMarshaller 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–2017 FuseSource, Corp.. All rights reserved.