|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IAbstractNodeDataCoder<T extends IAbstractNodeData>
Interface for coding (compressing) an INodeData or ILeafData
onto a byte[].
| Method Summary | |
|---|---|
T |
decode(AbstractFixedByteArrayBuffer data)
Return an IAbstractNodeData instance which can access the coded
data. |
AbstractFixedByteArrayBuffer |
encode(T node,
DataOutputBuffer buf)
Encode the data, returning a slice containing the coded data. |
T |
encodeLive(T node,
DataOutputBuffer buf)
Encode the data, returning a reference to a coded instance of the data. |
boolean |
isLeafDataCoder()
Return true if this implementation can code data records
for B+Tree leaves. |
boolean |
isNodeDataCoder()
Return true if this implementation can code data records for
B+Tree nodes. |
| Method Detail |
|---|
boolean isNodeDataCoder()
true if this implementation can code data records for
B+Tree nodes.
INodeDataboolean isLeafDataCoder()
true if this implementation can code data records
for B+Tree leaves.
ILeafData
AbstractFixedByteArrayBuffer encode(T node,
DataOutputBuffer buf)
Note: Implementations of this method are typically heavy. While it is
always valid to encode(IAbstractNodeData, DataOutputBuffer) an
IAbstractNodeData, DO NOT invoke this arbitrarily on
data which may already be coded. The IAbstractNodeCodedData
interface will always be implemented for coded data.
node - The node or leaf data.buf - A buffer on which the coded data will be written.
UnsupportedOperationException - if IAbstractNodeData.isLeaf() is true
and this IAbstractNodeDataCoder can not code B+Tree
ILeafData records.
UnsupportedOperationException - if IAbstractNodeData.isLeaf() is false
and this IAbstractNodeDataCoder can not code B+Tree
INodeData records.
T encodeLive(T node,
DataOutputBuffer buf)
Note: Implementations of this method are typically heavy. While it is
always valid to encode(IAbstractNodeData, DataOutputBuffer) an
IAbstractNodeData, DO NOT invoke this arbitrarily on
data which may already be coded. The IAbstractNodeCodedData
interface will always be implemented for coded data.
node - The node or leaf data.buf - A buffer on which the coded data will be written.
IAbstractNodeData.data() is a slice onto the
post-condition state of the caller's buffer whose view
corresponds to the coded record. This may be written directly
onto an output stream or the slice may be converted to an exact
fit byte[].
UnsupportedOperationException - if IAbstractNodeData.isLeaf() is true
and this IAbstractNodeDataCoder can not code B+Tree
ILeafData records.
UnsupportedOperationException - if IAbstractNodeData.isLeaf() is false
and this IAbstractNodeDataCoder can not code B+Tree
INodeData records.T decode(AbstractFixedByteArrayBuffer data)
IAbstractNodeData instance which can access the coded
data.
data - The record containing the coded data.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||