HeaderSerializer

class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[A](implicit serializer: HeaderSerializer[A]): HeaderSerializer[A]

Creates a new HeaderSerializer which serializes all values of type A as null.

Creates a new HeaderSerializer which serializes all values of type A as null.

Source:
HeaderSerializer.scala
def const[A](bytes: Array[Byte]): HeaderSerializer[A]

Creates a new HeaderSerializer which serializes all values of type A to the specified bytes.

Creates a new HeaderSerializer which serializes all values of type A to the specified bytes.

Source:
HeaderSerializer.scala
def delegate[A](serializer: Serializer[A]): HeaderSerializer[A]

Creates a new HeaderSerializer which delegates serialization to the specified Kafka Serializer. Note that the close and configure functions won't be called for the delegate. Also, the topic is an empty String and no headers are provided.

Creates a new HeaderSerializer which delegates serialization to the specified Kafka Serializer. Note that the close and configure functions won't be called for the delegate. Also, the topic is an empty String and no headers are provided.

Source:
HeaderSerializer.scala

Creates a new HeaderSerializer which serializes all values of type A as the empty Array[Byte].

Creates a new HeaderSerializer which serializes all values of type A as the empty Array[Byte].

Source:
HeaderSerializer.scala
def instance[A](f: A => Array[Byte]): HeaderSerializer[A]

Creates a new HeaderSerializer from the specified function.

Creates a new HeaderSerializer from the specified function.

Source:
HeaderSerializer.scala

Creates a new HeaderSerializer which serializes String values using the specified Charset. Note that the default String serializer uses UTF-8.

Creates a new HeaderSerializer which serializes String values using the specified Charset. Note that the default String serializer uses UTF-8.

Source:
HeaderSerializer.scala

Creates a new HeaderSerializer which serializes UUID values as Strings with the specified Charset. Note that the default UUID serializer uses UTF-8.

Creates a new HeaderSerializer which serializes UUID values as Strings with the specified Charset. Note that the default UUID serializer uses UTF-8.

Source:
HeaderSerializer.scala

Implicits

Implicits

The identity HeaderSerializer, which does not perform serialization, simply using the input bytes as the output.

The identity HeaderSerializer, which does not perform serialization, simply using the input bytes as the output.

Source:
HeaderSerializer.scala
implicit def option[A](implicit serializer: HeaderSerializer[A]): HeaderSerializer[Option[A]]

The option HeaderSerializer serializes None as null, and serializes Some values using the serializer for type A.

The option HeaderSerializer serializes None as null, and serializes Some values using the serializer for type A.

Source:
HeaderSerializer.scala