Class CopyForIterateMapSerializer


  • public class CopyForIterateMapSerializer
    extends com.esotericsoftware.kryo.serializers.MapSerializer
    A kryo Serializer that creates a copy of the source map for writing object data.

    This is useful for applications where objects/maps that are serialized might be accessed by different threads. However, it only reduces the probability of concurrent modification exceptions, as even during taking the copy the map might be modified by another thread.

    Author:
    Martin Grotzke
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.esotericsoftware.kryo.serializers.MapSerializer

        com.esotericsoftware.kryo.serializers.MapSerializer.BindMap
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void write​(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output, Map object)  
      • Methods inherited from class com.esotericsoftware.kryo.serializers.MapSerializer

        copy, create, createCopy, getKeyClass, getKeySerializer, getValueClass, getValueSerializer, read, setKeyClass, setKeyClass, setKeysCanBeNull, setKeySerializer, setValueClass, setValueClass, setValuesCanBeNull, setValueSerializer, writeHeader
      • Methods inherited from class com.esotericsoftware.kryo.Serializer

        getAcceptsNull, isImmutable, setAcceptsNull, setImmutable
    • Constructor Detail

      • CopyForIterateMapSerializer

        public CopyForIterateMapSerializer()
    • Method Detail

      • write

        public void write​(com.esotericsoftware.kryo.Kryo kryo,
                          com.esotericsoftware.kryo.io.Output output,
                          Map object)
        Overrides:
        write in class com.esotericsoftware.kryo.serializers.MapSerializer