Class CopyForIterateCollectionSerializer


  • public class CopyForIterateCollectionSerializer
    extends com.esotericsoftware.kryo.serializers.CollectionSerializer
    A kryo Serializer that creates a copy of the source collection for writing object data.

    This is useful for applications where objects/collections 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 collection might be modified by another thread.

    Author:
    Martin Grotzke
    • Nested Class Summary

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

        com.esotericsoftware.kryo.serializers.CollectionSerializer.BindCollection
    • 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, Collection object)  
      • Methods inherited from class com.esotericsoftware.kryo.serializers.CollectionSerializer

        copy, create, createCopy, getElementClass, getElementSerializer, read, setElementClass, setElementClass, setElementsCanBeNull, setElementSerializer, writeHeader
      • Methods inherited from class com.esotericsoftware.kryo.Serializer

        getAcceptsNull, isImmutable, setAcceptsNull, setImmutable
    • Constructor Detail

      • CopyForIterateCollectionSerializer

        public CopyForIterateCollectionSerializer()
    • Method Detail

      • write

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