Class UnmodifiableMapSerializer

java.lang.Object
com.esotericsoftware.kryo.kryo5.Serializer<T>
com.twitter.chill.java.UnmodifiableMapSerializer

public class UnmodifiableMapSerializer extends com.esotericsoftware.kryo.kryo5.Serializer<T>
A kryo Serializer for unmodifiable maps created via Collections.unmodifiableMap(Map).

Note: This serializer does not support cyclic references, so if one of the objects gets set the list as attribute this might cause an error during deserialization.

  • Constructor Details

    • UnmodifiableMapSerializer

      public UnmodifiableMapSerializer()
  • Method Details

    • registrar

      public static IKryoRegistrar registrar()
    • getInnerField

      protected Field getInnerField() throws Exception
      Throws:
      Exception
    • newInstance

      protected Map<?,?> newInstance(Map<?,?> m)
    • read

      public Map<?,?> read(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Input input, Class<? extends Map<?,?>> type)
      Specified by:
      read in class com.esotericsoftware.kryo.kryo5.Serializer<T>
    • write

      public void write(com.esotericsoftware.kryo.kryo5.Kryo kryo, com.esotericsoftware.kryo.kryo5.io.Output output, Map<?,?> object)
      Specified by:
      write in class com.esotericsoftware.kryo.kryo5.Serializer<T>