public class Node256 extends Node
count, ILLEGAL_IDX, nodeType, prefix, prefixLength| 构造器和说明 |
|---|
Node256(int compressedPrefixSize) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
deserializeNodeBody(java.nio.ByteBuffer byteBuffer)
deserialize the node's body content
|
void |
deserializeNodeBody(java.io.DataInput dataInput)
deserialize the node's body content
|
Node |
getChild(int pos)
get the child at the specified position in the node, the 'pos' range from 0 to count
|
byte |
getChildKey(int pos)
get the corresponding key byte of the requested position
|
int |
getChildPos(byte k)
get the position of a child corresponding to the input key 'k'
|
int |
getMaxPos()
get the max child's position
|
int |
getMinPos()
get the position of the min element in current node.
|
org.bitlap.roaringbitmap.art.SearchResult |
getNearestChildPos(byte k)
get the position of a child corresponding to the input key 'k' if present
if 'k' is not in the child, return the positions of the neighbouring nodes instead
|
int |
getNextLargerPos(int pos)
get the next position in the node
|
int |
getNextSmallerPos(int pos)
get the next smaller element's position
|
static Node256 |
insert(Node currentNode,
Node child,
byte key)
insert the child node into the node256 node with the key byte
|
Node |
remove(int pos)
remove the specified position child
|
void |
replaceChildren(Node[] children)
replace the node's children according to the given children parameter while doing the
deserialization phase.
|
void |
replaceNode(int pos,
Node freshOne)
replace the position child to the fresh one
|
void |
serializeNodeBody(java.nio.ByteBuffer byteBuffer)
serialize the node's body content
|
void |
serializeNodeBody(java.io.DataOutput dataOutput)
serialize the node's body content
|
int |
serializeNodeBodySizeInBytes()
the serialized size except the common node header part
|
binarySearch, copyPrefix, deserialize, deserialize, insertLeaf, serialize, serialize, serializeSizeInBytespublic int getChildPos(byte k)
NodegetChildPos 在类中 Nodek - a key value of the byte rangepublic org.bitlap.roaringbitmap.art.SearchResult getNearestChildPos(byte k)
NodegetNearestChildPos 在类中 Nodek - a key value of the byte rangepublic byte getChildKey(int pos)
NodegetChildKey 在类中 Nodepos - the positionpublic Node getChild(int pos)
Nodepublic void replaceNode(int pos,
Node freshOne)
NodereplaceNode 在类中 Nodepos - the positionfreshOne - the fresh node to replace the old onepublic int getMinPos()
Nodepublic int getNextLargerPos(int pos)
NodegetNextLargerPos 在类中 Nodepos - current position,-1 to start from the min onepublic int getMaxPos()
Nodepublic int getNextSmallerPos(int pos)
NodegetNextSmallerPos 在类中 Nodepos - the position,-1 to start from the largest onepublic static Node256 insert(Node currentNode, Node child, byte key)
currentNode - the node256child - the child nodekey - the key bytepublic void replaceChildren(Node[] children)
Nodechildren - all the not null children nodes in key byte ascending order,no null elementpublic void serializeNodeBody(java.io.DataOutput dataOutput)
throws java.io.IOException
NodedataOutput - the DataOutputjava.io.IOException - exception indicates serialization errorspublic void serializeNodeBody(java.nio.ByteBuffer byteBuffer)
throws java.io.IOException
NodebyteBuffer - the ByteBufferjava.io.IOException - exception indicates serialization errorspublic void deserializeNodeBody(java.io.DataInput dataInput)
throws java.io.IOException
NodedataInput - the DataInputjava.io.IOException - exception indicates deserialization errorspublic void deserializeNodeBody(java.nio.ByteBuffer byteBuffer)
throws java.io.IOException
NodebyteBuffer - the ByteBufferjava.io.IOException - exception indicates deserialization errorspublic int serializeNodeBodySizeInBytes()
NodeserializeNodeBodySizeInBytes 在类中 Node