Class SerializerBase<V>
java.lang.Object
com.esotericsoftware.kryo.kryo5.Serializer<V>
ch.qos.logback.core.kryo.SerializerBase<V>
- Direct Known Subclasses:
BasicStringSerializer, ClassNameSerializer, KeyValuePairSerializer, LoggerContextVOSerializer, MDCPropertyMapSerializer, MultiEventCompressedStringSerializer, SingleItemCompressingStringSerializer, StackTraceElementProxySerializerV5, StackTraceElementSerializer
Base Kryo serializer with optional value↔id caching.
When a bimap is configured, each value is introduced with a 2-byte header packing
a 13-bit data word (NEW/CACHED flag + 12-bit id) and a 3-bit CRC over those data bits.
Ids must be in 1..MAX_SERIALIZER_ID, or KryoCoreConstants.UNREGISTERED_ID
for frequency-gated non-registrations. Cached hits write only that header; new values also
write the payload via writeNewEntry(Kryo, Output, V).
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSerializerBase(int capacity) SerializerBase(SerializerBase.BiMapType biMapType, int capacity) -
Method Summary
Modifier and TypeMethodDescriptionread(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Input input, Class<? extends V> type) protected abstract VreadNewEntry(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Input input) voidwrite(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Output output, V value) protected abstract voidwriteNewEntry(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Output output, V value) Method called to write new entries.Methods inherited from class com.esotericsoftware.kryo.kryo5.Serializer
copy, getAcceptsNull, isImmutable, setAcceptsNull, setImmutable
-
Constructor Details
-
SerializerBase
-
SerializerBase
-
-
Method Details
-
write
-
writeNewEntry
protected abstract void writeNewEntry(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Output output, V value) Method called to write new entries.- Parameters:
kryo-output-value-
-
read
-
readNewEntry
protected abstract V readNewEntry(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Input input)
-