Interface StreamingSerializer

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    public interface StreamingSerializer
    A contract capable of serializing a stream of Objects into a stream of Buffers. This interface is designed to be used as a function that can convert an Object into a Buffer. serialize(Object, Buffer) maybe called multiple times.

    A StreamingSerializer implementation may chose to be stateful or stateless. This contract does not assume either. Implementations are assumed to be synchronous.

    • Method Detail

      • serialize

        void serialize​(java.lang.Object toSerialize,
                       Buffer destination)
        Serializes the passed Object toSerialize into the passed Buffer synchronously.
        toSerialize - Object to serialize.
        destination - Buffer to which the serialized representation of toSerialize is to be written.