Class TypeSerializerSnapshotSerializationUtil
- java.lang.Object
-
- org.apache.flink.api.common.typeutils.TypeSerializerSnapshotSerializationUtil
-
public class TypeSerializerSnapshotSerializationUtil extends Object
Utility methods for serialization ofTypeSerializerSnapshot.
-
-
Constructor Summary
Constructors Constructor Description TypeSerializerSnapshotSerializationUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> TypeSerializerSnapshot<T>readAndInstantiateSnapshotClass(DataInputView in, ClassLoader cl)static <T> TypeSerializerSnapshot<T>readSerializerSnapshot(DataInputView in, ClassLoader userCodeClassLoader)Reads from a data input view aTypeSerializerSnapshotthat was previously written using {@link #writeSerializerSnapshot(DataOutputView, TypeSerializerSnapshot}.static <T> voidwriteSerializerSnapshot(DataOutputView out, TypeSerializerSnapshot<T> serializerSnapshot)Writes aTypeSerializerSnapshotto the provided data output view.
-
-
-
Method Detail
-
writeSerializerSnapshot
public static <T> void writeSerializerSnapshot(DataOutputView out, TypeSerializerSnapshot<T> serializerSnapshot) throws IOException
Writes aTypeSerializerSnapshotto the provided data output view.It is written with a format that can be later read again using
readSerializerSnapshot(DataInputView, ClassLoader).- Parameters:
out- the data output viewserializerSnapshot- the serializer configuration snapshot to write- Throws:
IOException
-
readSerializerSnapshot
public static <T> TypeSerializerSnapshot<T> readSerializerSnapshot(DataInputView in, ClassLoader userCodeClassLoader) throws IOException
Reads from a data input view aTypeSerializerSnapshotthat was previously written using {@link #writeSerializerSnapshot(DataOutputView, TypeSerializerSnapshot}.- Parameters:
in- the data input viewuserCodeClassLoader- the user code class loader to use- Returns:
- the read serializer configuration snapshot
- Throws:
IOException
-
readAndInstantiateSnapshotClass
public static <T> TypeSerializerSnapshot<T> readAndInstantiateSnapshotClass(DataInputView in, ClassLoader cl) throws IOException
- Throws:
IOException
-
-