object GenericDeserializer
- Source
- Deserializer.scala
- Alphabetic
- By Inheritance
- GenericDeserializer
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply[F[_]](implicit F: Sync[F]): Deserializer[F, Array[Byte]]
Alias for Deserializer#identity.
- def apply[F[_], A](implicit deserializer: Deserializer[F, A]): Deserializer[F, A]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- implicit def attempt[F[_], A](implicit deserializer: Deserializer[F, A]): Deserializer[F, Either[Throwable, A]]
The attempt Deserializer try to deserialize to type
A
, When it fails returnsLeft
containing the exception, otherwise returnsRight
with the valueA
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def const[F[_], A](a: A)(implicit F: Sync[F]): Deserializer[F, A]
Creates a new Deserializer which deserializes all bytes to the specified value of type
A
. - def delegate[F[_], A](deserializer: KafkaDeserializer[A])(implicit F: Sync[F]): Deserializer[F, A]
Creates a new Deserializer which delegates deserialization to the specified Kafka
Deserializer
.Creates a new Deserializer which delegates deserialization to the specified Kafka
Deserializer
. Note that theclose
andconfigure
functions won't be called for the delegate.It is assumed the delegate
deserialize
function is pure. If it's not pure, then usesuspend
afterdelegate
, so the impure behaviours can be captured properly. - implicit def double[F[_]](implicit F: Sync[F]): Deserializer[F, Double]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fail[F[_], A](e: Throwable)(implicit F: Sync[F]): Deserializer[F, A]
Creates a new Deserializer which always fails deserialization with the specified exception
e
. - def failWith[F[_], A](message: String)(implicit F: Sync[F]): Deserializer[F, A]
Creates a new Deserializer which always fails deserialization with a DeserializationException using the specified message.
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- implicit def float[F[_]](implicit F: Sync[F]): Deserializer[F, Float]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def headers[F[_], A](f: (Headers) => Deserializer[F, A])(implicit F: Sync[F]): Deserializer[F, A]
Creates a new Deserializer which can use different Deserializers depending on the record headers.
- implicit def identity[F[_]](implicit F: Sync[F]): Deserializer[F, Array[Byte]]
The identity Deserializer, which does not perform any kind of deserialization, simply using the input bytes as the output.
- def instance[F[_], A](f: (String, Headers, Array[Byte]) => F[A])(implicit F: Sync[F]): Deserializer[F, A]
Creates a new Deserializer from the specified function.
Creates a new Deserializer from the specified function. Use lift instead if the deserializer doesn't need access to the Kafka topic name or record headers.
- implicit def int[F[_]](implicit F: Sync[F]): Deserializer[F, Int]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lift[F[_], A](f: (Array[Byte]) => F[A])(implicit F: Sync[F]): Deserializer[F, A]
Creates a new Deserializer from the specified function, ignoring from which Kafka topic the bytes came and any record headers.
Creates a new Deserializer from the specified function, ignoring from which Kafka topic the bytes came and any record headers. Use instance instead if the deserializer needs access to the Kafka topic name or the record headers.
- implicit def long[F[_]](implicit F: Sync[F]): Deserializer[F, Long]
- implicit def monadError[T <: KeyOrValue, F[_]](implicit F: Sync[F]): MonadError[[γ$0$]GenericDeserializer[T, F, γ$0$], Throwable]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- implicit def option[F[_], A](implicit deserializer: Deserializer[F, A]): Deserializer[F, Option[A]]
The option Deserializer returns
None
when the bytes arenull
, and otherwise deserializes using the deserializer for the typeA
, wrapping the result inSome
. - implicit def resource[T <: KeyOrValue, F[_], A](implicit des: GenericDeserializer[T, F, A]): Resource[F, GenericDeserializer[T, F, A]]
- implicit def short[F[_]](implicit F: Sync[F]): Deserializer[F, Short]
- implicit def string[F[_]](implicit F: Sync[F]): Deserializer[F, String]
- def string[F[_]](charset: Charset)(implicit F: Sync[F]): Deserializer[F, String]
Creates a new Deserializer which deserializes
String
values using the specifiedCharset
.Creates a new Deserializer which deserializes
String
values using the specifiedCharset
. Note that the defaultString
deserializer usesUTF-8
. - final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def topic[T <: KeyOrValue, F[_], A](f: PartialFunction[String, GenericDeserializer[T, F, A]])(implicit F: Sync[F]): GenericDeserializer[T, F, A]
Creates a new Deserializer which can use different Deserializers depending on the Kafka topic name from which the serialized bytes came.
- implicit def unit[F[_]](implicit F: Sync[F]): Deserializer[F, Unit]
- implicit def uuid[F[_]](implicit F: Sync[F]): Deserializer[F, UUID]
- def uuid[F[_]](charset: Charset)(implicit F: Sync[F]): Deserializer[F, UUID]
Creates a new Deserializer which deserializes
String
values using the specifiedCharset
asUUID
s.Creates a new Deserializer which deserializes
String
values using the specifiedCharset
asUUID
s. Note that the defaultUUID
deserializer usesUTF-8
. - final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()