T - The type of element in the list.public final class ListSerializer<T> extends org.apache.flink.api.common.typeutils.TypeSerializer<List<T>>
Lists. The serializer relies on an element serializer for the
serialization of the list's elements.
The serialization format for the list is as follows: four bytes for the length of the lost, followed by the serialized representation of each element.
| 限定符和类型 | 类和说明 |
|---|---|
static class |
ListSerializer.ListSerializerSnapshot<T>
Snapshot class for the
ListSerializer. |
| 构造器和说明 |
|---|
ListSerializer(org.apache.flink.api.common.typeutils.TypeSerializer<T> elementSerializer)
Creates a list serializer that uses the given serializer to serialize the list's elements.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
copy(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target) |
List<T> |
copy(List<T> from) |
List<T> |
copy(List<T> from,
List<T> reuse) |
List<T> |
createInstance() |
List<T> |
deserialize(org.apache.flink.core.memory.DataInputView source) |
List<T> |
deserialize(List<T> reuse,
org.apache.flink.core.memory.DataInputView source) |
org.apache.flink.api.common.typeutils.TypeSerializer<List<T>> |
duplicate() |
boolean |
equals(Object obj) |
org.apache.flink.api.common.typeutils.TypeSerializer<T> |
getElementSerializer()
Gets the serializer for the elements of the list.
|
int |
getLength() |
int |
hashCode() |
boolean |
isImmutableType() |
void |
serialize(List<T> list,
org.apache.flink.core.memory.DataOutputView target) |
org.apache.flink.api.common.typeutils.TypeSerializerSnapshot<List<T>> |
snapshotConfiguration() |
public ListSerializer(org.apache.flink.api.common.typeutils.TypeSerializer<T> elementSerializer)
elementSerializer - The serializer for the elements of the listpublic org.apache.flink.api.common.typeutils.TypeSerializer<T> getElementSerializer()
public boolean isImmutableType()
public int getLength()
public void serialize(List<T> list, org.apache.flink.core.memory.DataOutputView target) throws IOException
serialize 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<List<T>>IOExceptionpublic List<T> deserialize(org.apache.flink.core.memory.DataInputView source) throws IOException
deserialize 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<List<T>>IOExceptionpublic List<T> deserialize(List<T> reuse, org.apache.flink.core.memory.DataInputView source) throws IOException
deserialize 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<List<T>>IOExceptionpublic void copy(org.apache.flink.core.memory.DataInputView source,
org.apache.flink.core.memory.DataOutputView target)
throws IOException
copy 在类中 org.apache.flink.api.common.typeutils.TypeSerializer<List<T>>IOExceptionpublic boolean equals(Object obj)
public int hashCode()
Copyright © 2025 The Apache Software Foundation. All rights reserved.