@Internal public abstract class TypeSerializerSingleton<T> extends TypeSerializer<T>
Constructor and Description |
---|
TypeSerializerSingleton() |
Modifier and Type | Method and Description |
---|---|
TypeSerializerSingleton<T> |
duplicate()
Creates a deep copy of this serializer if it is necessary, i.e.
|
CompatibilityResult<T> |
ensureCompatibility(TypeSerializerConfigSnapshot<?> configSnapshot)
This method is deprecated.
|
boolean |
equals(Object obj) |
int |
hashCode() |
protected boolean |
isCompatibleSerializationFormatIdentifier(String identifier)
Subclasses can override this if they know that they are also compatible with identifiers of other formats.
|
TypeSerializerSnapshot<T> |
snapshotConfiguration()
Snapshots the configuration of this TypeSerializer.
|
canEqual, copy, copy, copy, createInstance, deserialize, deserialize, getLength, isImmutableType, serialize
public TypeSerializerSingleton<T> duplicate()
TypeSerializer
duplicate
in class TypeSerializer<T>
public int hashCode()
hashCode
in class TypeSerializer<T>
public boolean equals(Object obj)
equals
in class TypeSerializer<T>
public TypeSerializerSnapshot<T> snapshotConfiguration()
TypeSerializer
The snapshot of the TypeSerializer is supposed to contain all information that affects the serialization format of the serializer. The snapshot serves two purposes: First, to reproduce the serializer when the checkpoint/savepoint is restored, and second, to check whether the serialization format is compatible with the serializer used in the restored program.
IMPORTANT: TypeSerializerSnapshots changed after Flink 1.6. Serializers implemented against Flink versions up to 1.6 should still work, but adjust to new model to enable state evolution and be future-proof. See the class-level comments, section "Upgrading TypeSerializers to the new TypeSerializerSnapshot model" for details.
snapshotConfiguration
in class TypeSerializer<T>
null
).TypeSerializerSnapshot.resolveSchemaCompatibility(TypeSerializer)
public CompatibilityResult<T> ensureCompatibility(TypeSerializerConfigSnapshot<?> configSnapshot)
TypeSerializer
TypeSerializerSnapshot.resolveSchemaCompatibility(TypeSerializer)
.
New serializers should not override this method any more! Serializers implemented against Flink versions up to 1.6 should still work, but should adjust to new model to enable state evolution and be future-proof. See the class-level comments, section "Upgrading TypeSerializers to the new TypeSerializerSnapshot model" for details.
ensureCompatibility
in class TypeSerializer<T>
protected boolean isCompatibleSerializationFormatIdentifier(String identifier)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.