Class MDCPropertyMapSerializer

java.lang.Object
com.esotericsoftware.kryo.kryo5.Serializer<Map<String,String>>
ch.qos.logback.core.kryo.SerializerBase<Map<String,String>>
ch.qos.logback.classic.kryo.MDCPropertyMapSerializer
Direct Known Subclasses:
MDCPropertyMapSerializerV5

Serializer for MDC property maps (Map<String, String>).

Each map is written as:

  1. entry count (writeVarInt), excluding null keys and null values
  2. for each remaining entry: key string, then value string

The default constructor caches whole maps with SerializerBase.BiMapType.DIRECT_MAP (equals/hashCode). MDCPropertyMapSerializerV5 uses SerializerBase.BiMapType.IDENTITY. Decode returns Map.copyOf(Map). An older stream may still contain a null value; that entry is read and dropped.

By default key and value strings share one nested string serializer. MDCPropertyMapSerializerV5 uses BasicStringSerializer for keys and a caller-supplied value codec (the V5 message/argument long-string serializer).

Null maps are not handled here; callers should use writeObjectOrNull / readObjectOrNull.