T
- the enum type.@Deprecated public static final class EnumSerializer.EnumSerializerConfigSnapshot<T extends Enum<T>> extends GenericTypeSerializerConfigSnapshot<T>
Configuration contains the enum class, and an array of the enum's constants that existed when the configuration snapshot was taken.
TypeSerializerConfigSnapshot.SelfResolvingTypeSerializer<E>
Constructor and Description |
---|
EnumSerializerConfigSnapshot()
Deprecated.
This empty nullary constructor is required for deserializing the configuration.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Deprecated.
|
int[] |
getCompatibleVersions()
Deprecated.
Returns the compatible version values.
|
int |
getVersion()
Deprecated.
Returns the version number of the object.
|
int |
hashCode()
Deprecated.
|
void |
read(DataInputView in)
Deprecated.
Reads the object's internal data from the given data input view.
|
TypeSerializerSchemaCompatibility<T> |
resolveSchemaCompatibility(TypeSerializer<T> newSerializer)
Deprecated.
Checks a new serializer's compatibility to read data written by the prior serializer.
|
void |
write(DataOutputView out)
Deprecated.
Writes the object's internal data to the given data output view.
|
getTypeClass
getCurrentVersion, getUserCodeClassLoader, readSnapshot, restoreSerializer, setPriorSerializer, setUserCodeClassLoader, writeSnapshot
getReadVersion
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
readVersionedSnapshot, writeVersionedSnapshot
public EnumSerializerConfigSnapshot()
public void write(DataOutputView out) throws IOException
IOReadableWritable
write
in interface IOReadableWritable
write
in class GenericTypeSerializerConfigSnapshot<T extends Enum<T>>
out
- the output view to receive the data.IOException
- thrown if any error occurs while writing to the output streampublic void read(DataInputView in) throws IOException
IOReadableWritable
read
in interface IOReadableWritable
read
in class GenericTypeSerializerConfigSnapshot<T extends Enum<T>>
in
- the input view to read the data fromIOException
- thrown if any error occurs while reading from the input streampublic TypeSerializerSchemaCompatibility<T> resolveSchemaCompatibility(TypeSerializer<T> newSerializer)
TypeSerializerSnapshot
When a checkpoint/savepoint is restored, this method checks whether the serialization format of the data in the checkpoint/savepoint is compatible for the format of the serializer used by the program that restores the checkpoint/savepoint. The outcome can be that the serialization format is compatible, that the program's serializer needs to reconfigure itself (meaning to incorporate some information from the TypeSerializerSnapshot to be compatible), that the format is outright incompatible, or that a migration needed. In the latter case, the TypeSerializerSnapshot produces a serializer to deserialize the data, and the restoring program's serializer re-serializes the data, thus converting the format during the restore operation.
resolveSchemaCompatibility
in interface TypeSerializerSnapshot<T extends Enum<T>>
resolveSchemaCompatibility
in class TypeSerializerConfigSnapshot<T extends Enum<T>>
newSerializer
- the new serializer to check.public int getVersion()
Versioned
public int[] getCompatibleVersions()
VersionedIOReadableWritable
By default, the base implementation recognizes only the current version (identified by Versioned.getVersion()
)
as compatible. This method can be used as a hook and may be overridden to identify more compatible versions.
getCompatibleVersions
in class VersionedIOReadableWritable
public boolean equals(Object obj)
equals
in class GenericTypeSerializerConfigSnapshot<T extends Enum<T>>
public int hashCode()
hashCode
in class GenericTypeSerializerConfigSnapshot<T extends Enum<T>>
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.