| Package | Description |
|---|---|
| org.apache.directory.mavibot.btree | |
| org.apache.directory.mavibot.btree.memory | |
| org.apache.directory.mavibot.btree.persisted | |
| org.apache.directory.mavibot.btree.util |
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
Addition<K,V>
A class used to store an Addition modification done on a BTree.
|
(package private) class |
Deletion<K,V>
A class used to store a Delete modification done on a BTree.
|
(package private) class |
Modification<K,V>
An abstract class used to store a modification done on a BTree.
|
(package private) class |
NameRevision
A data structure that stores a Btree name associated with a revision.
|
(package private) class |
PoisonPill<K,V>
This is special class which is injected into the journal queue to tell
the journal thread that it should stop.
|
(package private) class |
RevisionName
A data structure that stores a revision associated to a BTree name.
|
| Modifier and Type | Field and Description |
|---|---|
private Tuple<K,V> |
AbstractDeleteResult.removedElement
The removed element if the key was found in the tree
|
| Modifier and Type | Method and Description |
|---|---|
Tuple<K,V> |
BTree.delete(K key)
Delete the entry which key is given as a parameter.
|
Tuple<K,V> |
AbstractBTree.delete(K key)
Delete the entry which key is given as a parameter.
|
(package private) Tuple<K,V> |
AbstractBTree.delete(K key,
long revision)
Delete the entry which key is given as a parameter.
|
Tuple<K,V> |
BTree.delete(K key,
V value)
Delete the value from an entry associated with the given key.
|
Tuple<K,V> |
AbstractBTree.delete(K key,
V value)
Delete the value from an entry associated with the given key.
|
protected Tuple<K,V> |
InMemoryBTree.delete(K key,
V value,
long revision)
Deletes the given
|
(package private) Tuple<K,V> |
PersistedBTree.delete(K key,
V value,
long revision)
Deletes the given
|
(package private) abstract Tuple<K,V> |
AbstractBTree.delete(K key,
V value,
long revision) |
private static <K,V> Tuple<K,java.util.Set<V>> |
BulkLoader.fetchTuple(BTree<K,V> btree,
java.io.FileInputStream fis) |
Tuple<K,V> |
InMemoryLeaf.findLeftMost()
Finds the leftmost element in this page.
|
Tuple<K,V> |
AbstractPage.findLeftMost()
Finds the leftmost element in this page.
|
Tuple<K,V> |
PersistedLeaf.findLeftMost()
Finds the leftmost element in this page.
|
Tuple<K,V> |
Page.findLeftMost()
Finds the leftmost element in this page.
|
Tuple<K,V> |
InMemoryLeaf.findRightMost()
Finds the rightmost element in this page.
|
Tuple<K,V> |
AbstractPage.findRightMost()
Finds the rightmost element in this page.
|
Tuple<K,V> |
PersistedLeaf.findRightMost()
Finds the rightmost element in this page.
|
Tuple<K,V> |
Page.findRightMost()
Finds the rightmost element in this page.
|
Tuple<K,V> |
AbstractDeleteResult.getRemovedElement() |
Tuple<K,V> |
DeleteResult.getRemovedElement() |
Tuple<K,V> |
NotPresentResult.getRemovedElement() |
Tuple<K,V> |
EmptyTupleCursor.next()
Always throws a NoSuchElementException.
|
Tuple<K,V> |
TupleCursor.next()
Find the next key/value
|
Tuple<K,V> |
EmptyTupleCursor.nextKey()
Always throws a NoSuchElementException.
|
Tuple<K,V> |
TupleCursor.nextKey()
Get the next non-duplicate key.
|
Tuple<K,V> |
EmptyTupleCursor.prev()
Always throws a NoSuchElementException.
|
Tuple<K,V> |
TupleCursor.prev()
Find the previous key/value
|
Tuple<K,V> |
EmptyTupleCursor.prevKey()
Always throws a NoSuchElementException.
|
Tuple<K,V> |
TupleCursor.prevKey()
Get the previous non-duplicate key.
|
private static <K,V> Tuple<java.util.Iterator<Tuple<K,java.util.Set<V>>>,BulkLoader.SortedFile> |
BulkLoader.processFiles(BTree<K,V> btree,
java.util.Iterator<Tuple<K,java.util.Set<V>>> dataIterator)
Read all the sorted files, and inject them into one single big file containing all the
sorted and merged elements.
|
private static <K,V> Tuple<K,java.util.Set<V>>[] |
BulkLoader.sort(BTree<K,V> btree,
java.util.List<Tuple<K,V>> tuples)
Sort a list of tuples, eliminating the duplicate keys and storing the values in a set when we
have a duplicate key
|
| Modifier and Type | Method and Description |
|---|---|
private static <K,V> java.util.Iterator<Tuple<K,java.util.Set<V>>> |
BulkLoader.createIterator(BTree<K,V> btree,
java.io.FileInputStream[] streams)
Build an iterator over an array of sorted tuples, from files on the disk
|
private static <K,V> java.util.Iterator<Tuple<K,java.util.Set<V>>> |
BulkLoader.createTupleIterator(BTree<K,V> btree,
java.util.List<Tuple<K,V>> tuples)
Build an iterator over an array of sorted tuples, in memory
|
private static <K,V> java.util.Iterator<Tuple<K,java.util.Set<V>>> |
BulkLoader.createUniqueFileIterator(BTree<K,V> btree,
java.io.FileInputStream stream)
Build an iterator over an array of sorted tuples, from files on the disk
|
private static <K,V> Tuple<java.util.Iterator<Tuple<K,java.util.Set<V>>>,BulkLoader.SortedFile> |
BulkLoader.processFiles(BTree<K,V> btree,
java.util.Iterator<Tuple<K,java.util.Set<V>>> dataIterator)
Read all the sorted files, and inject them into one single big file containing all the
sorted and merged elements.
|
| Modifier and Type | Method and Description |
|---|---|
private int |
InMemoryBTreeBuilder.add(BTree<K,V> btree,
Page<K,V>[] pageStack,
int level,
Page<K,V> page,
Tuple<K,V> tuple) |
private DeleteResult<K,V> |
InMemoryLeaf.borrowFromLeft(Tuple<K,V> removedElement,
long revision,
InMemoryLeaf<K,V> sibling,
int pos)
Borrows an element from the left sibling, creating a new sibling with one
less element and creating a new page where the element to remove has been
deleted and the borrowed element added on the left.
|
private DeleteResult<K,V> |
PersistedLeaf.borrowFromLeft(Tuple<K,V> removedElement,
long revision,
PersistedLeaf<K,V> sibling,
int pos)
Borrows an element from the left sibling, creating a new sibling with one
less element and creating a new page where the element to remove has been
deleted and the borrowed element added on the left.
|
private DeleteResult<K,V> |
InMemoryLeaf.borrowFromRight(Tuple<K,V> removedElement,
long revision,
InMemoryLeaf<K,V> sibling,
int pos)
Borrows an element from the right sibling, creating a new sibling with one
less element and creating a new page where the element to remove has been
deleted and the borrowed element added on the right.
|
private DeleteResult<K,V> |
PersistedLeaf.borrowFromRight(Tuple<K,V> removedElement,
long revision,
PersistedLeaf<K,V> sibling,
int pos)
Borrows an element from the right sibling, creating a new sibling with one
less element and creating a new page where the element to remove has been
deleted and the borrowed element added on the right.
|
int |
TupleComparator.compare(Tuple<K,V> t1,
Tuple<K,V> t2)
Compare two tuples.
|
int |
TupleComparator.compare(Tuple<K,V> t1,
Tuple<K,V> t2)
Compare two tuples.
|
int |
Tuple.compareTo(Tuple<K,V> t) |
private static <K,V> void |
BulkLoader.injectInLeaf(BTree<K,V> btree,
Tuple<K,java.util.Set<V>> tuple,
LevelInfo<K,V> leafLevel)
Inject a tuple into a leaf
|
private void |
InMemoryBTreeBuilder.injectTuple(BTree<K,V> btree,
InMemoryLeaf<K,V> leaf,
int leafPos,
Tuple<K,V> tuple) |
private DeleteResult<K,V> |
InMemoryLeaf.mergeWithSibling(Tuple<K,V> removedElement,
long revision,
InMemoryLeaf<K,V> sibling,
boolean isLeft,
int pos)
Merges the sibling with the current leaf, after having removed the element in the page.
|
private DeleteResult<K,V> |
PersistedLeaf.mergeWithSibling(Tuple<K,V> removedElement,
long revision,
PersistedLeaf<K,V> sibling,
boolean isLeft,
int pos)
Merges the sibling with the current leaf, after having removed the element in the page.
|
| Modifier and Type | Method and Description |
|---|---|
private Page<K,V> |
InMemoryBTreeBuilder.addLeaves(BTree<K,V> btree,
java.util.List<Tuple<K,V>> tuples,
int maxElements)
Creates all the leaves using the provided tuples, and update the upper layer if needed
|
BTree<K,V> |
InMemoryBTreeBuilder.build(java.util.Iterator<Tuple<K,V>> sortedTupleItr) |
BTree<K,V> |
PersistedBTreeBuilder.build(java.util.Iterator<Tuple<K,V>> sortedTupleItr) |
private static <K,V> BTree<K,V> |
BulkLoader.bulkLoad(BTree<K,V> btree,
java.util.Iterator<Tuple<K,java.util.Set<V>>> dataIterator,
int nbElems)
Construct the target BTree from the sorted data.
|
private static <K,V> BTree<K,V> |
BulkLoader.bulkLoadSinglePage(BTree<K,V> btree,
java.util.Iterator<Tuple<K,java.util.Set<V>>> dataIterator,
int nbElems) |
private static <K,V> java.util.Iterator<Tuple<K,java.util.Set<V>>> |
BulkLoader.createTupleIterator(BTree<K,V> btree,
java.util.List<Tuple<K,V>> tuples)
Build an iterator over an array of sorted tuples, in memory
|
private static <K,V> java.io.File |
BulkLoader.flushToDisk(int fileNb,
java.util.List<Tuple<K,V>> tuples,
BTree<K,V> btree)
Flush a list of tuples to disk after having sorted them.
|
static <K,V> BTree<K,V> |
BulkLoader.load(BTree<K,V> btree,
java.util.Iterator<Tuple<K,V>> iterator,
int chunkSize)
Bulk Load data into a persisted BTree
|
private static <K,V> Tuple<java.util.Iterator<Tuple<K,java.util.Set<V>>>,BulkLoader.SortedFile> |
BulkLoader.processFiles(BTree<K,V> btree,
java.util.Iterator<Tuple<K,java.util.Set<V>>> dataIterator)
Read all the sorted files, and inject them into one single big file containing all the
sorted and merged elements.
|
private static <K,V> int |
BulkLoader.readElements(BTree<K,V> btree,
java.util.Iterator<Tuple<K,V>> iterator,
java.util.List<java.io.File> sortedFiles,
java.util.List<Tuple<K,V>> tuples,
int chunkSize)
Process the data, and creates files to store them sorted if necessary, or store them
TODO readElements.
|
private static <K,V> int |
BulkLoader.readElements(BTree<K,V> btree,
java.util.Iterator<Tuple<K,V>> iterator,
java.util.List<java.io.File> sortedFiles,
java.util.List<Tuple<K,V>> tuples,
int chunkSize)
Process the data, and creates files to store them sorted if necessary, or store them
TODO readElements.
|
private static <K,V> Tuple<K,java.util.Set<V>>[] |
BulkLoader.sort(BTree<K,V> btree,
java.util.List<Tuple<K,V>> tuples)
Sort a list of tuples, eliminating the duplicate keys and storing the values in a set when we
have a duplicate key
|
| Constructor and Description |
|---|
AbstractBorrowedFromSiblingResult(java.util.List<Page<K,V>> copiedPages,
Page<K,V> modifiedPage,
Page<K,V> modifiedSibling,
Tuple<K,V> removedElement,
AbstractBorrowedFromSiblingResult.SiblingPosition position)
A constructor for RemoveResult with a list of copied pages.
|
AbstractBorrowedFromSiblingResult(Page<K,V> modifiedPage,
Page<K,V> modifiedSibling,
Tuple<K,V> removedElement,
AbstractBorrowedFromSiblingResult.SiblingPosition position)
The default constructor for RemoveResult.
|
AbstractDeleteResult(java.util.List<Page<K,V>> copiedPages,
Page<K,V> modifiedPage,
Tuple<K,V> removedElement)
The default constructor for AbstractDeleteResult.
|
AbstractDeleteResult(Page<K,V> modifiedPage,
Tuple<K,V> removedElement)
The default constructor for AbstractDeleteResult.
|
BorrowedFromLeftResult(java.util.List<Page<K,V>> copiedPages,
Page<K,V> modifiedPage,
Page<K,V> modifiedSibling,
Tuple<K,V> removedElement)
A constructor for BorrowedFromLeftResult which takes a list of copied pages.
|
BorrowedFromLeftResult(Page<K,V> modifiedPage,
Page<K,V> modifiedSibling,
Tuple<K,V> removedElement)
The default constructor for BorrowedFromLeftResult.
|
BorrowedFromRightResult(java.util.List<Page<K,V>> copiedPages,
Page<K,V> modifiedPage,
Page<K,V> modifiedSibling,
Tuple<K,V> removedElement)
A constructor for BorrowedFromRightResult which takes a list of copied pages.
|
BorrowedFromRightResult(Page<K,V> modifiedPage,
Page<K,V> modifiedSibling,
Tuple<K,V> removedElement)
The default constructor for BorrowedFromRightResult.
|
MergedWithSiblingResult(java.util.List<Page<K,V>> copiedPages,
Page<K,V> modifiedPage,
Tuple<K,V> removedElement)
A constructor for RemoveResult which takes a list of copied page.
|
MergedWithSiblingResult(Page<K,V> modifiedPage,
Tuple<K,V> removedElement)
The default constructor for RemoveResult.
|
RemoveResult(java.util.List<Page<K,V>> copiedPages,
Page<K,V> modifiedPage,
Tuple<K,V> removedElement)
A constructor for RemoveResult which takes a list of copied pages.
|
RemoveResult(Page<K,V> modifiedPage,
Tuple<K,V> removedElement)
The default constructor for RemoveResult.
|
| Modifier and Type | Field and Description |
|---|---|
private java.util.Comparator<Tuple<K,V>> |
BulkDataSorter.tupleComparator |
| Modifier and Type | Method and Description |
|---|---|
java.util.Iterator<Tuple<K,V>> |
BulkDataSorter.getMergeSortedTuples() |
| Modifier and Type | Method and Description |
|---|---|
private void |
BulkDataSorter.storeSortedData(Tuple<K,V>[] arr) |
| Constructor and Description |
|---|
BulkDataSorter(TupleReaderWriter<K,V> readerWriter,
java.util.Comparator<Tuple<K,V>> tupleComparator,
int splitAfter) |
| Modifier and Type | Field and Description |
|---|---|
private java.util.Comparator<Tuple<K,V>> |
BulkDataSorter.tupleComparator |
| Modifier and Type | Method and Description |
|---|---|
java.util.Iterator<Tuple<K,V>> |
BulkDataSorter.getMergeSortedTuples() |
| Modifier and Type | Method and Description |
|---|---|
private void |
BulkDataSorter.storeSortedData(Tuple<K,V>[] arr) |
| Constructor and Description |
|---|
BulkDataSorter(TupleReaderWriter<K,V> readerWriter,
java.util.Comparator<Tuple<K,V>> tupleComparator,
int splitAfter) |
| Modifier and Type | Method and Description |
|---|---|
Tuple<K,V> |
TupleReaderWriter.readSortedTuple(java.io.DataInputStream in) |
Tuple<java.lang.Integer,java.lang.Integer> |
IntTupleReaderWriter.readSortedTuple(java.io.DataInputStream in) |
Tuple<K,V> |
TupleReaderWriter.readUnsortedTuple(java.io.DataInputStream in) |
Tuple<java.lang.Integer,java.lang.Integer> |
IntTupleReaderWriter.readUnsortedTuple(java.io.DataInputStream in) |
| Modifier and Type | Method and Description |
|---|---|
void |
IntTupleReaderWriter.storeSortedTuple(Tuple<java.lang.Integer,java.lang.Integer> t,
java.io.DataOutputStream out) |
void |
TupleReaderWriter.storeSortedTuple(Tuple<K,V> t,
java.io.DataOutputStream out) |