Class DeterministicClassResolver
java.lang.Object
com.esotericsoftware.kryo.kryo5.util.DefaultClassResolver
com.broadleafcommerce.data.tracking.core.mapping.cache.DeterministicClassResolver
- All Implemented Interfaces:
com.esotericsoftware.kryo.kryo5.ClassResolver
public class DeterministicClassResolver
extends com.esotericsoftware.kryo.kryo5.util.DefaultClassResolver
ClassResolver
that enhances the behavior of DefaultClassResolver
to calculate
registration ids for classes using a deterministic algorithm based on hashcode, rather than
simply increment a counter.- Author:
- Jeff FischerĀ¬
-
Field Summary
Fields inherited from class com.esotericsoftware.kryo.kryo5.util.DefaultClassResolver
classToNameId, classToRegistration, idToRegistration, kryo, NAME, nameIdToClass, nameToClass, nextNameId
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
emitTypeIfApplicable
(com.esotericsoftware.kryo.kryo5.Registration registration) Check the current registration and detect if it represents a dynamic class generated by ByteBuddy.com.esotericsoftware.kryo.kryo5.Registration
register
(com.esotericsoftware.kryo.kryo5.Registration registration) Methods inherited from class com.esotericsoftware.kryo.kryo5.util.DefaultClassResolver
getRegistration, getRegistration, getTypeByName, readClass, readName, registerImplicit, reset, setKryo, unregister, writeClass, writeName
-
Constructor Details
-
DeterministicClassResolver
public DeterministicClassResolver()
-
-
Method Details
-
register
public com.esotericsoftware.kryo.kryo5.Registration register(com.esotericsoftware.kryo.kryo5.Registration registration) - Specified by:
register
in interfacecom.esotericsoftware.kryo.kryo5.ClassResolver
- Overrides:
register
in classcom.esotericsoftware.kryo.kryo5.util.DefaultClassResolver
-
emitTypeIfApplicable
protected void emitTypeIfApplicable(com.esotericsoftware.kryo.kryo5.Registration registration) Check the current registration and detect if it represents a dynamic class generated by ByteBuddy. If so, register the class withDynamicClassContext
.- Parameters:
registration
- The registration to evaluate for a dynamic class
-