T - the java type of the raw value.@Internal public final class BinaryRawValueData<T> extends LazyBinaryFormat<T> implements RawValueData<T>
RawValueData which is backed by MemorySegments
and generic Object.
Either MemorySegments or Object must be provided when constructing BinaryRawValueData. The other representation will be materialized when needed.
HIGHEST_FIRST_BIT, HIGHEST_SECOND_TO_EIGHTH_BIT, MAX_FIX_PART_DATA_SIZE| 构造器和说明 |
|---|
BinaryRawValueData(org.apache.flink.core.memory.MemorySegment[] segments,
int offset,
int sizeInBytes) |
BinaryRawValueData(org.apache.flink.core.memory.MemorySegment[] segments,
int offset,
int sizeInBytes,
T javaObject) |
BinaryRawValueData(T javaObject) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
equals(Object o) |
static <T> BinaryRawValueData<T> |
fromBytes(byte[] bytes)
Creates a
BinaryStringData instance from the given bytes. |
static <T> BinaryRawValueData<T> |
fromBytes(byte[] bytes,
int offset,
int numBytes)
Creates a
BinaryStringData instance from the given bytes with offset and number of
bytes. |
static <T> BinaryRawValueData<T> |
fromObject(T javaObject)
Creates a
BinaryRawValueData instance from the given Java object. |
int |
hashCode() |
protected BinarySection |
materialize(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
Materialize java object to binary format.
|
byte[] |
toBytes(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
Converts this
RawValueData into a byte array. |
T |
toObject(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
Converts this
RawValueData into a Java object. |
String |
toString() |
ensureMaterialized, getBinarySection, getJavaObject, getOffset, getSegments, getSizeInBytes, setJavaObjectpublic BinaryRawValueData(T javaObject)
public BinaryRawValueData(org.apache.flink.core.memory.MemorySegment[] segments,
int offset,
int sizeInBytes)
public BinaryRawValueData(org.apache.flink.core.memory.MemorySegment[] segments,
int offset,
int sizeInBytes,
T javaObject)
public T toObject(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
RawValueDataRawValueData into a Java object.
The given serializer is required because the "raw value" might be represented in a binary format and needs to be deserialized first.
Note: The returned Java object may be reused.
toObject 在接口中 RawValueData<T>public byte[] toBytes(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
RawValueDataRawValueData into a byte array.
The given serializer is required because the "raw value" might be still be a Java object and needs to be serialized first.
Note: The returned byte array may be reused.
toBytes 在接口中 RawValueData<T>protected BinarySection materialize(org.apache.flink.api.common.typeutils.TypeSerializer<T> serializer)
LazyBinaryFormatRawValueData needs javaObjectSerializer).materialize 在类中 LazyBinaryFormat<T>public static <T> BinaryRawValueData<T> fromObject(T javaObject)
BinaryRawValueData instance from the given Java object.fromObject 在接口中 RawValueData<T>public static <T> BinaryRawValueData<T> fromBytes(byte[] bytes)
BinaryStringData instance from the given bytes.fromBytes 在接口中 RawValueData<T>public static <T> BinaryRawValueData<T> fromBytes(byte[] bytes, int offset, int numBytes)
BinaryStringData instance from the given bytes with offset and number of
bytes.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.