@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(TypeSerializer<?>[] newNestedSerializers,
TypeSerializerSnapshot<?>[] nestedSerializerSnapshots)
Constructs an
CompositeTypeSerializerUtil.IntermediateCompatibilityResult with the given array of nested serializers and their
corresponding serializer snapshots. |
static <T> TypeSerializerSchemaCompatibility<T> |
delegateCompatibilityCheckToNewSnapshot(TypeSerializer<T> newSerializer,
CompositeTypeSerializerSnapshot<T,? extends TypeSerializer> 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(TypeSerializer<T> newSerializer, CompositeTypeSerializerSnapshot<T,? extends TypeSerializer> newCompositeSnapshot, TypeSerializerSnapshot<?>... legacyNestedSnapshots)
CompositeTypeSerializerSnapshot
instance.
This can be used by legacy snapshot classes, which have a newer implementation
implemented as a CompositeTypeSerializerSnapshot
.newSerializer
- the new serializer 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(TypeSerializer<?>[] newNestedSerializers, TypeSerializerSnapshot<?>[] nestedSerializerSnapshots)
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.
newNestedSerializers
- the new nested serializers to check for compatibility.nestedSerializerSnapshots
- the associated nested serializers' snapshots.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.