public interface IAbstractNodeDataCoder<T extends IAbstractNodeData> extends Serializable
Modifier and Type | Method and Description |
---|---|
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. |
boolean isNodeDataCoder()
true
if this implementation can code data records for
B+Tree nodes.INodeData
boolean 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.Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.