public class BPlusTreeUtility
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
BPlusTreeUtility.BPlusTreeDeleter
Helper class that attempts to delete tuple(s) in a new thread
|
static class |
BPlusTreeUtility.BPlusTreeInserter
Helper class that attempts to insert a tuple in a new thread
|
(package private) static class |
BPlusTreeUtility.BPlusTreeReader
Helper class that searches for tuple(s) in a new thread
|
(package private) static class |
BPlusTreeUtility.BPlusTreeWriter
Helper class that attempts to insert a tuple in a new thread
|
Modifier and Type | Field and Description |
---|---|
static int |
MAX_RAND_VALUE |
Constructor and Description |
---|
BPlusTreeUtility() |
Modifier and Type | Method and Description |
---|---|
static BPlusTreeFile |
createBPlusTreeFile(int columns,
int rows,
java.util.Map<java.lang.Integer,java.lang.Integer> columnSpecification,
java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> tuples,
int keyField)
creates a *non* random B+ tree file for testing
|
static BPlusTreeFile |
createEmptyBPlusTreeFile(java.lang.String path,
int cols,
int keyField)
A utility method to create a new BPlusTreeFile with no data,
assuming the path does not already exist.
|
static BPlusTreeFile |
createRandomBPlusTreeFile(int columns,
int rows,
int maxValue,
java.util.Map<java.lang.Integer,java.lang.Integer> columnSpecification,
java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> tuples,
int keyField)
Generates a random B+ tree file for testing
|
static BPlusTreeFile |
createRandomBPlusTreeFile(int columns,
int rows,
java.util.Map<java.lang.Integer,java.lang.Integer> columnSpecification,
java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> tuples,
int keyField) |
static BPlusTreeEntry |
getBPlusTreeEntry(int n) |
static BPlusTreeEntry |
getBPlusTreeEntry(int n,
int tableid) |
static BPlusTreeEntry |
getBPlusTreeEntry(int n,
int key,
int tableid) |
static Tuple |
getBPlusTreeTuple(int n) |
static Tuple |
getBPlusTreeTuple(int[] tupdata) |
static Tuple |
getBPlusTreeTuple(int n,
int width) |
static BPlusTreeFile |
openBPlusTreeFile(int cols,
java.io.File f,
int keyField)
Opens a BPlusTreeFile and adds it to the catalog.
|
static BPlusTreeFile |
openBPlusTreeFile(int cols,
java.lang.String colPrefix,
java.io.File f,
int keyField) |
static java.util.ArrayList<java.lang.Integer> |
tupleToList(Tuple tuple) |
public static final int MAX_RAND_VALUE
public static java.util.ArrayList<java.lang.Integer> tupleToList(Tuple tuple)
public static Tuple getBPlusTreeTuple(int n)
public static Tuple getBPlusTreeTuple(int[] tupdata)
public static Tuple getBPlusTreeTuple(int n, int width)
public static BPlusTreeEntry getBPlusTreeEntry(int n)
public static BPlusTreeEntry getBPlusTreeEntry(int n, int tableid)
public static BPlusTreeEntry getBPlusTreeEntry(int n, int key, int tableid)
public static BPlusTreeFile createRandomBPlusTreeFile(int columns, int rows, java.util.Map<java.lang.Integer,java.lang.Integer> columnSpecification, java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> tuples, int keyField) throws java.io.IOException, DbException, TransactionAbortedException
columnSpecification
- Mapping between column index and value.java.io.IOException
DbException
TransactionAbortedException
public static BPlusTreeFile createRandomBPlusTreeFile(int columns, int rows, int maxValue, java.util.Map<java.lang.Integer,java.lang.Integer> columnSpecification, java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> tuples, int keyField) throws java.io.IOException, DbException, TransactionAbortedException
columns
- - number of columnsrows
- - number of rowsmaxValue
- - the maximum random value in this B+ treecolumnSpecification
- - optional column specificationtuples
- - optional list of tuples to returnkeyField
- - the index of the key fieldjava.io.IOException
DbException
TransactionAbortedException
public static BPlusTreeFile createBPlusTreeFile(int columns, int rows, java.util.Map<java.lang.Integer,java.lang.Integer> columnSpecification, java.util.ArrayList<java.util.ArrayList<java.lang.Integer>> tuples, int keyField) throws java.io.IOException, DbException, TransactionAbortedException
columns
- - number of columnsrows
- - number of rowscolumnSpecification
- - optional column specificationtuples
- - optional list of tuples to returnkeyField
- - the index of the key fieldjava.io.IOException
DbException
TransactionAbortedException
public static BPlusTreeFile openBPlusTreeFile(int cols, java.io.File f, int keyField)
cols
- number of columns in the table.f
- location of the file storing the table.keyField
- the field the B+ tree is keyed onpublic static BPlusTreeFile openBPlusTreeFile(int cols, java.lang.String colPrefix, java.io.File f, int keyField)
public static BPlusTreeFile createEmptyBPlusTreeFile(java.lang.String path, int cols, int keyField) throws java.io.IOException
java.io.IOException