Class ExtendedSerializer.Wrapper<T>

    • Constructor Detail

      • Wrapper

        public Wrapper​(Serializer<T> serializer)
    • Method Detail

      • serialize

        public byte[] serialize​(String topic,
                                Headers headers,
                                T data)
        Description copied from interface: ExtendedSerializer
        Convert data into a byte array.
        Specified by:
        serialize in interface ExtendedSerializer<T>
        Specified by:
        serialize in interface Serializer<T>
        Parameters:
        topic - topic associated with data
        headers - headers associated with the record
        data - typed data
        Returns:
        serialized bytes
      • configure

        public void configure​(Map<String,​?> configs,
                              boolean isKey)
        Description copied from interface: Serializer
        Configure this class.
        Specified by:
        configure in interface Serializer<T>
        Parameters:
        configs - configs in key/value pairs
        isKey - whether is for key or value
      • serialize

        public byte[] serialize​(String topic,
                                T data)
        Description copied from interface: Serializer
        Convert data into a byte array.
        Specified by:
        serialize in interface Serializer<T>
        Parameters:
        topic - topic associated with data
        data - typed data
        Returns:
        serialized bytes
      • close

        public void close()
        Description copied from interface: Serializer
        Close this serializer.

        This method must be idempotent as it may be called multiple times.

        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface Serializer<T>