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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 interface com.esotericsoftware.kryo.kryo5.ClassResolver
      Overrides:
      register in class com.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 with DynamicClassContext.
      Parameters:
      registration - The registration to evaluate for a dynamic class