class ProtoSerde<T> : BaseSerde<T>
The ProtoSerde class is a Kafka Serde/Serializer/Deserializer for Proto, version 2 and 3, objects.
T
- is the concrete Proto type to construct the ProtoSerde for.
parser
- for serialization and deserialization of T.
See Also
ProtoSerde(parser: Parser<T>)
The ProtoSerde class is a Kafka Serde/Serializer/Deserializer for Proto, version 2 and 3, objects. |
fun doDeserialize(topic: String, data: ByteArray): T
Extending classes must implement this function to convert the ByteArray back to its original type T. |
|
fun doSerialize(topic: String, data: T): ByteArray
Extending classes must implement this method to convert data of type T to a ByteArray. |
open fun close(): Unit
Close this Serde/Serializer/Deserializer and frees any currently held resources. This method must be idempotent because it might be called multiple times. |
|
open fun configure(config: Map<String, *>, isKey: Boolean): Unit
Configure this object, which will configure the underlying Serializer and Deserializer. |
|
fun deserialize(topic: String, data: ByteArray?): T?
|
|
fun deserializer(): Deserializer<T>
Get the underlying Deserializer |
|
fun serialize(topic: String, data: T?): ByteArray?
|
|
fun serializer(): Serializer<T>
Get the underlying Serializer |