Class ArgumentArraySerializerV5

java.lang.Object
com.esotericsoftware.kryo.kryo5.Serializer<Object[]>
ch.qos.logback.classic.kryo.ArgumentArraySerializerV5

public class ArgumentArraySerializerV5 extends com.esotericsoftware.kryo.kryo5.Serializer<Object[]>
V5 serializer for message argument arrays (Object[]).

Does not use Kryo's default polymorphic array encoding. Each element is reduced by SafeObjectTransformer and written via SafeObjectCodec (1-byte type tag + compact payload). String arguments share a stream-scoped string serializer: LoggingEventKryoVOSerializerV5 passes its MultiEventCompressedStringSerializer, the int constructor uses a SingleItemCompressingStringSerializer.

Wire format:

  varInt(length)
  length × (SafeObjectCodec element)

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

See Also:
  • Constructor Details

    • ArgumentArraySerializerV5

    • ArgumentArraySerializerV5

      public ArgumentArraySerializerV5(int stringCapacity)
      Parameters:
      stringCapacity - capacity of the string cache for string arguments
    • ArgumentArraySerializerV5

      public ArgumentArraySerializerV5(com.esotericsoftware.kryo.kryo5.Serializer<String> stringSerializer)
      Parameters:
      stringSerializer - shared cache for string arguments (must not be null)
  • Method Details

    • getStringSerializer

      public com.esotericsoftware.kryo.kryo5.Serializer<String> getStringSerializer()
    • write

      public void write(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Output output, Object[] arguments)
      Specified by:
      write in class com.esotericsoftware.kryo.kryo5.Serializer<Object[]>
    • read

      public Object[] read(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Input input, Class<? extends Object[]> type)
      Specified by:
      read in class com.esotericsoftware.kryo.kryo5.Serializer<Object[]>