Class TypeInformationSerializationSchema<T>

    • Constructor Detail

      • TypeInformationSerializationSchema

        public TypeInformationSerializationSchema​(TypeInformation<T> typeInfo,
                                                  ExecutionConfig ec)
        Creates a new de-/serialization schema for the given type.
        Parameters:
        typeInfo - The type information for the type de-/serialized by this schema.
        ec - The execution config, which is used to parametrize the type serializers.
      • TypeInformationSerializationSchema

        public TypeInformationSerializationSchema​(TypeInformation<T> typeInfo,
                                                  TypeSerializer<T> serializer)
        Creates a new de-/serialization schema for the given type.
        Parameters:
        typeInfo - The type information for the type de-/serialized by this schema.
        serializer - The serializer to use for de-/serialization.
    • Method Detail

      • deserialize

        public T deserialize​(byte[] message)
        Description copied from interface: DeserializationSchema
        Deserializes the byte message.
        Specified by:
        deserialize in interface DeserializationSchema<T>
        Parameters:
        message - The message, as a byte array.
        Returns:
        The deserialized message as an object (null if the message cannot be deserialized).
      • isEndOfStream

        public boolean isEndOfStream​(T nextElement)
        This schema never considers an element to signal end-of-stream, so this method returns always false.
        Specified by:
        isEndOfStream in interface DeserializationSchema<T>
        Parameters:
        nextElement - The element to test for the end-of-stream signal.
        Returns:
        Returns false.
      • serialize

        public byte[] serialize​(T element)
        Description copied from interface: SerializationSchema
        Serializes the incoming element to a specified type.
        Specified by:
        serialize in interface SerializationSchema<T>
        Parameters:
        element - The incoming element to be serialized
        Returns:
        The serialized element.