T
- The type to be serialized.@Public public class TypeInformationSerializationSchema<T> extends Object implements DeserializationSchema<T>, SerializationSchema<T>
DeserializationSchema.InitializationContext
SerializationSchema.InitializationContext
Constructor and Description |
---|
TypeInformationSerializationSchema(TypeInformation<T> typeInfo,
ExecutionConfig ec)
Creates a new de-/serialization schema for the given type.
|
TypeInformationSerializationSchema(TypeInformation<T> typeInfo,
TypeSerializer<T> serializer)
Creates a new de-/serialization schema for the given type.
|
Modifier and Type | Method and Description |
---|---|
T |
deserialize(byte[] message)
Deserializes the byte message.
|
TypeInformation<T> |
getProducedType()
Gets the data type (as a
TypeInformation ) produced by this function or input format. |
boolean |
isEndOfStream(T nextElement)
This schema never considers an element to signal end-of-stream, so this method returns always
false.
|
byte[] |
serialize(T element)
Serializes the incoming element to a specified type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
deserialize, open
open
public TypeInformationSerializationSchema(TypeInformation<T> typeInfo, ExecutionConfig ec)
typeInfo
- The type information for the type de-/serialized by this schema.ec
- The execution config, which is used to parametrize the type serializers.public TypeInformationSerializationSchema(TypeInformation<T> typeInfo, TypeSerializer<T> serializer)
typeInfo
- The type information for the type de-/serialized by this schema.serializer
- The serializer to use for de-/serialization.public T deserialize(byte[] message)
DeserializationSchema
deserialize
in interface DeserializationSchema<T>
message
- The message, as a byte array.public boolean isEndOfStream(T nextElement)
isEndOfStream
in interface DeserializationSchema<T>
nextElement
- The element to test for the end-of-stream signal.public byte[] serialize(T element)
SerializationSchema
serialize
in interface SerializationSchema<T>
element
- The incoming element to be serializedpublic TypeInformation<T> getProducedType()
ResultTypeQueryable
TypeInformation
) produced by this function or input format.getProducedType
in interface ResultTypeQueryable<T>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.