Class Serdes
- java.lang.Object
-
- org.apache.kafka.common.serialization.Serdes
-
public class Serdes extends Object
Factory for creating serializers / deserializers.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Serdes.BooleanSerde
static class
Serdes.ByteArraySerde
static class
Serdes.ByteBufferSerde
static class
Serdes.BytesSerde
static class
Serdes.DoubleSerde
static class
Serdes.FloatSerde
static class
Serdes.IntegerSerde
static class
Serdes.ListSerde<Inner>
static class
Serdes.LongSerde
static class
Serdes.ShortSerde
static class
Serdes.StringSerde
static class
Serdes.UUIDSerde
static class
Serdes.VoidSerde
static class
Serdes.WrapperSerde<T>
-
Constructor Summary
Constructors Constructor Description Serdes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Serde<Boolean>
Boolean()
A serde for nullableBoolean
type.static Serde<byte[]>
ByteArray()
A serde for nullablebyte[]
type.static Serde<ByteBuffer>
ByteBuffer()
A serde for nullableByteBuffer
type.static Serde<org.apache.kafka.common.utils.Bytes>
Bytes()
A serde for nullableBytes
type.static Serde<Double>
Double()
A serde for nullableDouble
type.static Serde<Float>
Float()
A serde for nullableFloat
type.static Serde<Integer>
Integer()
A serde for nullableInteger
type.static <L extends List<Inner>,Inner>
Serde<List<Inner>>ListSerde(Class<L> listClass, Serde<Inner> innerSerde)
static Serde<Long>
Long()
A serde for nullableLong
type.static <T> Serde<T>
serdeFrom(Class<T> type)
static <T> Serde<T>
serdeFrom(Serializer<T> serializer, Deserializer<T> deserializer)
Construct a serde object from separate serializer and deserializerstatic Serde<Short>
Short()
A serde for nullableShort
type.static Serde<String>
String()
A serde for nullableString
type.static Serde<UUID>
UUID()
A serde for nullableUUID
typestatic Serde<Void>
Void()
A serde forVoid
type.
-
-
-
Method Detail
-
serdeFrom
public static <T> Serde<T> serdeFrom(Serializer<T> serializer, Deserializer<T> deserializer)
Construct a serde object from separate serializer and deserializer- Parameters:
serializer
- must not be null.deserializer
- must not be null.
-
ByteBuffer
public static Serde<ByteBuffer> ByteBuffer()
A serde for nullableByteBuffer
type.
-
Bytes
public static Serde<org.apache.kafka.common.utils.Bytes> Bytes()
A serde for nullableBytes
type.
-
ByteArray
public static Serde<byte[]> ByteArray()
A serde for nullablebyte[]
type.
-
-