public interface PagedTypeSerializer<T> extends Serializer<T>
Modifier and Type | Method and Description |
---|---|
T |
deserializeFromPages(AbstractPagedInputView source)
De-serializes a record from the given source paged input view.
|
T |
deserializeFromPages(T reuse,
AbstractPagedInputView source)
Reuse version of
deserializeFromPages(AbstractPagedInputView) . |
T |
mapFromPages(T reuse,
AbstractPagedInputView source)
Map a reused record from the given source paged input view.
|
int |
serializeToPages(T record,
AbstractPagedOutputView target)
Serializes the given record to the given target paged output view.
|
void |
skipRecordFromPages(AbstractPagedInputView source)
Skip over bytes of one record from the paged input view, discarding the skipped bytes.
|
copy, deserialize, deserializeFromString, duplicate, serialize, serializeToString
int serializeToPages(T record, AbstractPagedOutputView target) throws IOException
BinaryRow
.record
- The record to serialize.target
- The output view to write the serialized data to.IOException
- Thrown, if the serialization encountered an I/O related error. Typically
raised by the output view, which may have an underlying I/O channel to which it
delegates.T deserializeFromPages(AbstractPagedInputView source) throws IOException
BinaryRow
. Typically, the content read from source should be copied out when
de-serializing, and we are not expecting the underlying data from source is reused. If you
have such requirement, see #mapFromPages(T, AbstractPagedInputView)
.source
- The input view from which to read the data.IOException
- Thrown, if the de-serialization encountered an I/O related error.
Typically raised by the input view, which may have an underlying I/O channel from which
it reads.T deserializeFromPages(T reuse, AbstractPagedInputView source) throws IOException
deserializeFromPages(AbstractPagedInputView)
.IOException
T mapFromPages(T reuse, AbstractPagedInputView source) throws IOException
If you choose the zero copy way, you have to deal with the lifecycle of the pages properly.
reuse
- the reused record to be mappedsource
- The input view from which to read the data.IOException
- Thrown, if the de-serialization encountered an I/O related error.
Typically raised by the input view, which may have an underlying I/O channel from which
it reads.void skipRecordFromPages(AbstractPagedInputView source) throws IOException
IOException
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.