@Internal public class CompositeTypeSerializerUtil extends Object
CompositeTypeSerializerSnapshot
.Modifier and Type | Class and Description |
---|---|
static class |
CompositeTypeSerializerUtil.IntermediateCompatibilityResult<T> |
Constructor and Description |
---|
CompositeTypeSerializerUtil() |
Modifier and Type | Method and Description |
---|---|
static <T> CompositeTypeSerializerUtil.IntermediateCompatibilityResult<T> |
constructIntermediateCompatibilityResult(TypeSerializerSnapshot<?>[] newNestedSerializerSnapshots,
TypeSerializerSnapshot<?>[] oldNestedSerializerSnapshots)
Constructs an
CompositeTypeSerializerUtil.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 a
CompositeTypeSerializerSnapshot instance. |
static void |
setNestedSerializersSnapshots(CompositeTypeSerializerSnapshot<?,?> compositeSnapshot,
TypeSerializerSnapshot<?>... nestedSnapshots)
Overrides the existing nested serializer's snapshots with the provided
nestedSnapshots . |
public static <T> TypeSerializerSchemaCompatibility<T> delegateCompatibilityCheckToNewSnapshot(TypeSerializerSnapshot<T> legacySerializerSnapshot, CompositeTypeSerializerSnapshot<T,? extends TypeSerializer<T>> newCompositeSnapshot, TypeSerializerSnapshot<?>... legacyNestedSnapshots)
CompositeTypeSerializerSnapshot
instance. This
can be used by legacy snapshot classes, which have a newer implementation implemented as a
CompositeTypeSerializerSnapshot
.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.public static void setNestedSerializersSnapshots(CompositeTypeSerializerSnapshot<?,?> compositeSnapshot, TypeSerializerSnapshot<?>... nestedSnapshots)
nestedSnapshots
.compositeSnapshot
- the composite snapshot to overwrite its nested serializers.nestedSnapshots
- the nested snapshots to overwrite with.public static <T> CompositeTypeSerializerUtil.IntermediateCompatibilityResult<T> constructIntermediateCompatibilityResult(TypeSerializerSnapshot<?>[] newNestedSerializerSnapshots, TypeSerializerSnapshot<?>[] oldNestedSerializerSnapshots)
CompositeTypeSerializerUtil.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()
, and TypeSerializerSchemaCompatibility.incompatible()
, these results are considered final.
newNestedSerializerSnapshots
- the new nested serializer snapshots to check for
compatibility.oldNestedSerializerSnapshots
- the associated previous nested serializers' snapshots.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.