|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.db.index.BTree
public final class BTree
Structure of the table:
b4 - flags b4 - length b8 - parent b8 - next tuples*Structure of a tuple:
b8 - ptr to the actual data key - the tuple's key
| Field Summary | |
|---|---|
static long |
FAIL
|
| Constructor Summary | |
|---|---|
BTree(Store store,
long rootBlockId,
int keySize,
KeyCompare keyCompare)
Creates a new BTree with the given backing. |
|
| Method Summary | |
|---|---|
void |
close()
|
void |
create()
Creates and initializes the btree. |
static BTree |
createStringTest(Path path,
int keySize)
|
static BTree |
createTest(Path path,
int keySize)
|
java.util.ArrayList<java.lang.String> |
getBlockKeys(long blockIndex)
Testing: returns the keys for a block |
long |
getIndexRoot()
Returns the index root. |
void |
insert(byte[] keyBuffer,
int keyOffset,
int keyLength,
long value,
Transaction xa,
boolean isOverride)
Inserts the new value for the given key. |
long |
lookup(byte[] keyBuffer,
int keyOffset,
int keyLength,
Transaction xa)
|
void |
remove(byte[] keyBuffer,
int keyOffset,
int keyLength,
Transaction xa)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long FAIL
| Constructor Detail |
|---|
public BTree(Store store,
long rootBlockId,
int keySize,
KeyCompare keyCompare)
throws java.io.IOException
store - the underlying store containing the btree.
java.io.IOException| Method Detail |
|---|
public long getIndexRoot()
public void create()
throws java.io.IOException
java.io.IOException
public long lookup(byte[] keyBuffer,
int keyOffset,
int keyLength,
Transaction xa)
throws java.io.IOException,
java.sql.SQLException
java.io.IOException
java.sql.SQLException
public void insert(byte[] keyBuffer,
int keyOffset,
int keyLength,
long value,
Transaction xa,
boolean isOverride)
throws java.sql.SQLException
java.sql.SQLException
public void remove(byte[] keyBuffer,
int keyOffset,
int keyLength,
Transaction xa)
throws java.sql.SQLException
java.sql.SQLException
public java.util.ArrayList<java.lang.String> getBlockKeys(long blockIndex)
throws java.io.IOException
java.io.IOException
public static BTree createTest(Path path,
int keySize)
throws java.io.IOException,
java.sql.SQLException
java.io.IOException
java.sql.SQLException
public static BTree createStringTest(Path path,
int keySize)
throws java.io.IOException,
java.sql.SQLException
java.io.IOException
java.sql.SQLExceptionpublic void close()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||