Class CompositeTypeSerializerUtil
- java.lang.Object
-
- org.apache.flink.api.common.typeutils.CompositeTypeSerializerUtil
-
@Internal public class CompositeTypeSerializerUtil extends Object
Utilities for theCompositeTypeSerializerSnapshot
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CompositeTypeSerializerUtil.IntermediateCompatibilityResult<T>
-
Constructor Summary
Constructors Constructor Description CompositeTypeSerializerUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> CompositeTypeSerializerUtil.IntermediateCompatibilityResult<T>
constructIntermediateCompatibilityResult(TypeSerializerSnapshot<?>[] newNestedSerializerSnapshots, TypeSerializerSnapshot<?>[] oldNestedSerializerSnapshots)
Constructs anCompositeTypeSerializerUtil.IntermediateCompatibilityResult
with the given array of nested serializers and their corresponding serializer snapshots.static <T> TypeSerializerSchemaCompatibility<T>
delegateCompatibilityCheckToNewSnapshot(TypeSerializerSnapshot<T> legacySerializerSnapshot, CompositeTypeSerializerSnapshot<T,? extends TypeSerializer<T>> newCompositeSnapshot, TypeSerializerSnapshot<?>... legacyNestedSnapshots)
Delegates compatibility checks to aCompositeTypeSerializerSnapshot
instance.static void
setNestedSerializersSnapshots(CompositeTypeSerializerSnapshot<?,?> compositeSnapshot, TypeSerializerSnapshot<?>... nestedSnapshots)
Overrides the existing nested serializer's snapshots with the providednestedSnapshots
.
-
-
-
Method Detail
-
delegateCompatibilityCheckToNewSnapshot
public static <T> TypeSerializerSchemaCompatibility<T> delegateCompatibilityCheckToNewSnapshot(TypeSerializerSnapshot<T> legacySerializerSnapshot, CompositeTypeSerializerSnapshot<T,? extends TypeSerializer<T>> newCompositeSnapshot, TypeSerializerSnapshot<?>... legacyNestedSnapshots)
Delegates compatibility checks to aCompositeTypeSerializerSnapshot
instance. This can be used by legacy snapshot classes, which have a newer implementation implemented as aCompositeTypeSerializerSnapshot
.- Parameters:
legacySerializerSnapshot
- the legacy serializer snapshot to check for compatibility.newCompositeSnapshot
- an instance of the new snapshot class to delegate compatibility checks to. This instance should already contain the outer snapshot information.legacyNestedSnapshots
- the nested serializer snapshots of the legacy composite snapshot.- Returns:
- the result compatibility.
-
setNestedSerializersSnapshots
public static void setNestedSerializersSnapshots(CompositeTypeSerializerSnapshot<?,?> compositeSnapshot, TypeSerializerSnapshot<?>... nestedSnapshots)
Overrides the existing nested serializer's snapshots with the providednestedSnapshots
.- Parameters:
compositeSnapshot
- the composite snapshot to overwrite its nested serializers.nestedSnapshots
- the nested snapshots to overwrite with.
-
constructIntermediateCompatibilityResult
public static <T> CompositeTypeSerializerUtil.IntermediateCompatibilityResult<T> constructIntermediateCompatibilityResult(TypeSerializerSnapshot<?>[] newNestedSerializerSnapshots, TypeSerializerSnapshot<?>[] oldNestedSerializerSnapshots)
Constructs anCompositeTypeSerializerUtil.IntermediateCompatibilityResult
with the given array of nested serializers and their corresponding serializer snapshots.This result is considered "intermediate", because the actual final result is not yet built if it isn't defined. This is the case if the final result is supposed to be
TypeSerializerSchemaCompatibility.compatibleWithReconfiguredSerializer(TypeSerializer)
, where construction of the reconfigured serializer instance should be done by the caller.For other cases, i.e.
TypeSerializerSchemaCompatibility.compatibleAsIs()
,TypeSerializerSchemaCompatibility.compatibleAfterMigration()
, andTypeSerializerSchemaCompatibility.incompatible()
, these results are considered final.- Parameters:
newNestedSerializerSnapshots
- the new nested serializer snapshots to check for compatibility.oldNestedSerializerSnapshots
- the associated previous nested serializers' snapshots.- Returns:
- the intermediate compatibility result of the new nested serializer snapshots.
-
-