Class ValueWithTs.Serializer
- java.lang.Object
-
- org.apache.flink.api.common.typeutils.TypeSerializer<T>
-
- org.apache.flink.api.common.typeutils.CompositeSerializer<ValueWithTs<?>>
-
- org.apache.flink.streaming.tests.verify.ValueWithTs.Serializer
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- ValueWithTs<V>
public static class ValueWithTs.Serializer extends CompositeSerializer<ValueWithTs<?>>
Serializer for Serializer.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.api.common.typeutils.CompositeSerializer
CompositeSerializer.PrecomputedParameters
-
-
Field Summary
-
Fields inherited from class org.apache.flink.api.common.typeutils.CompositeSerializer
fieldSerializers
-
-
Constructor Summary
Constructors Constructor Description Serializer(TypeSerializer<?> valueSerializer, TypeSerializer<Long> timestampSerializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValueWithTs<?>
createInstance(Object... values)
Create new instance from its fields.protected CompositeSerializer<ValueWithTs<?>>
createSerializerInstance(CompositeSerializer.PrecomputedParameters precomputed, TypeSerializer<?>... originalSerializers)
Factory for concrete serializer.protected Object
getField(ValueWithTs<?> value, int index)
Get field of existing instance.protected void
setField(ValueWithTs<?> value, int index, Object fieldValue)
Modify field of existing instance.TypeSerializerSnapshot<ValueWithTs<?>>
snapshotConfiguration()
Snapshots the configuration of this TypeSerializer.-
Methods inherited from class org.apache.flink.api.common.typeutils.CompositeSerializer
copy, copy, copy, createInstance, deserialize, deserialize, duplicate, equals, getLength, hashCode, isImmutableType, serialize
-
-
-
-
Constructor Detail
-
Serializer
public Serializer(TypeSerializer<?> valueSerializer, TypeSerializer<Long> timestampSerializer)
-
-
Method Detail
-
createInstance
public ValueWithTs<?> createInstance(@Nonnull Object... values)
Description copied from class:CompositeSerializer
Create new instance from its fields.- Specified by:
createInstance
in classCompositeSerializer<ValueWithTs<?>>
-
setField
protected void setField(@Nonnull ValueWithTs<?> value, int index, Object fieldValue)
Description copied from class:CompositeSerializer
Modify field of existing instance. Supported only by mutable types.- Specified by:
setField
in classCompositeSerializer<ValueWithTs<?>>
-
getField
protected Object getField(@Nonnull ValueWithTs<?> value, int index)
Description copied from class:CompositeSerializer
Get field of existing instance.- Specified by:
getField
in classCompositeSerializer<ValueWithTs<?>>
-
createSerializerInstance
protected CompositeSerializer<ValueWithTs<?>> createSerializerInstance(CompositeSerializer.PrecomputedParameters precomputed, TypeSerializer<?>... originalSerializers)
Description copied from class:CompositeSerializer
Factory for concrete serializer.- Specified by:
createSerializerInstance
in classCompositeSerializer<ValueWithTs<?>>
-
snapshotConfiguration
public TypeSerializerSnapshot<ValueWithTs<?>> snapshotConfiguration()
Description copied from class:TypeSerializer
Snapshots the configuration of this TypeSerializer. This method is only relevant if the serializer is used to state stored in checkpoints/savepoints.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.
- Specified by:
snapshotConfiguration
in classTypeSerializer<ValueWithTs<?>>
- Returns:
- snapshot of the serializer's current configuration (cannot be
null
). - See Also:
TypeSerializerSnapshot.resolveSchemaCompatibility(TypeSerializerSnapshot)
-
-