Class NestedSerializersSnapshotDelegate
- java.lang.Object
-
- org.apache.flink.api.common.typeutils.NestedSerializersSnapshotDelegate
-
@Internal public class NestedSerializersSnapshotDelegate extends Object
A NestedSerializersSnapshotDelegate represents the snapshots of multiple serializers that are used by an outer serializer. Examples would be tuples, where the outer serializer is the tuple format serializer, and the NestedSerializersSnapshotDelegate holds the serializers for the different tuple fields.The NestedSerializersSnapshotDelegate does not implement the
TypeSerializerSnapshotinterface. It is not meant to be inherited from, but to be composed with a serializer snapshot implementation.The NestedSerializersSnapshotDelegate has its own versioning internally, it does not couple its versioning to the versioning of the TypeSerializerSnapshot that builds on top of this class. That way, the NestedSerializersSnapshotDelegate and enclosing TypeSerializerSnapshot the can evolve their formats independently.
-
-
Constructor Summary
Constructors Constructor Description NestedSerializersSnapshotDelegate(TypeSerializer<?>... serializers)Constructor to create a snapshot for writing.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TypeSerializerSnapshot<?>[]getNestedSerializerSnapshots()Returns the snapshots of the nested serializers.<T> TypeSerializer<T>getRestoredNestedSerializer(int pos)Creates the restore serializer from the pos-th config snapshot.TypeSerializer<?>[]getRestoredNestedSerializers()Produces a restore serializer from each contained serializer configuration snapshot.static NestedSerializersSnapshotDelegatereadNestedSerializerSnapshots(DataInputView in, ClassLoader cl)Reads the composite snapshot of all the contained serializers.<T> TypeSerializerSchemaCompatibility<T>resolveCompatibilityWithNested(TypeSerializerSchemaCompatibility<?> outerCompatibility, TypeSerializer<?>... newNestedSerializers)Deprecated.this no method will be removed in the future.voidwriteNestedSerializerSnapshots(DataOutputView out)Writes the composite snapshot of all the contained serializers.
-
-
-
Constructor Detail
-
NestedSerializersSnapshotDelegate
public NestedSerializersSnapshotDelegate(TypeSerializer<?>... serializers)
Constructor to create a snapshot for writing.
-
-
Method Detail
-
getRestoredNestedSerializers
public TypeSerializer<?>[] getRestoredNestedSerializers()
Produces a restore serializer from each contained serializer configuration snapshot. The serializers are returned in the same order as the snapshots are stored.
-
getRestoredNestedSerializer
public <T> TypeSerializer<T> getRestoredNestedSerializer(int pos)
Creates the restore serializer from the pos-th config snapshot.
-
getNestedSerializerSnapshots
public TypeSerializerSnapshot<?>[] getNestedSerializerSnapshots()
Returns the snapshots of the nested serializers.- Returns:
- the snapshots of the nested serializers.
-
resolveCompatibilityWithNested
@Deprecated public <T> TypeSerializerSchemaCompatibility<T> resolveCompatibilityWithNested(TypeSerializerSchemaCompatibility<?> outerCompatibility, TypeSerializer<?>... newNestedSerializers)
Deprecated.this no method will be removed in the future. Resolving compatibility for nested serializers is now handled byCompositeTypeSerializerSnapshot.Resolves the compatibility of the nested serializer snapshots with the nested serializers of the new outer serializer.
-
writeNestedSerializerSnapshots
public final void writeNestedSerializerSnapshots(DataOutputView out) throws IOException
Writes the composite snapshot of all the contained serializers.- Throws:
IOException
-
readNestedSerializerSnapshots
public static NestedSerializersSnapshotDelegate readNestedSerializerSnapshots(DataInputView in, ClassLoader cl) throws IOException
Reads the composite snapshot of all the contained serializers.- Throws:
IOException
-
-