Class ChangedSerializer<T>

    • Constructor Detail

      • ChangedSerializer

        public ChangedSerializer​(Serializer<T> inner)
    • Method Detail

      • serialize

        public byte[] serialize​(String topic,
                                Headers headers,
                                Change<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
        headers - headers associated with the record
        data - typed data
        Returns:
        serialized bytes
        Throws:
        StreamsException - if both old and new values of data are null, or if both values are not null
      • serialize

        public byte[] serialize​(String topic,
                                Change<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>