|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bigdata.btree.raba.AbstractKeyBuffer
public abstract class AbstractKeyBuffer
Class with implementations supporting mutable and immutable variable length byte[] keys.
| Constructor Summary | |
|---|---|
AbstractKeyBuffer()
|
|
| Method Summary | |
|---|---|
protected abstract int |
_binarySearch(int searchKeyOffset,
byte[] searchKey)
Binary search. |
protected abstract int |
_linearSearch(int searchKeyOffset,
byte[] searchKey)
Linear search. |
protected abstract int |
_prefixMatchLength(int prefixLength,
byte[] searchKey)
Test the search key against the leading prefix shared by all bytes in the key buffer. |
abstract byte[] |
getPrefix()
Return the largest leading prefix shared by all keys. |
abstract int |
getPrefixLength()
The length of the leading prefix shared by all keys. |
Iterator<byte[]> |
iterator()
Iterator visits the byte[] elements in the view order. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.bigdata.btree.raba.IRaba |
|---|
add, add, add, capacity, copy, get, isEmpty, isFull, isKeys, isNull, isReadOnly, length, search, set, size |
| Constructor Detail |
|---|
public AbstractKeyBuffer()
| Method Detail |
|---|
protected abstract int _prefixMatchLength(int prefixLength,
byte[] searchKey)
prefixLength - The length of the prefix shared by all keys in the buffer.searchKey - The search key.
protected abstract int _linearSearch(int searchKeyOffset,
byte[] searchKey)
protected abstract int _binarySearch(int searchKeyOffset,
byte[] searchKey)
public Iterator<byte[]> iterator()
IRabanull, then the iterator will report a null for
that element.
iterator in interface IRabaiterator in interface Iterable<byte[]>public abstract byte[] getPrefix()
public abstract int getPrefixLength()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||