de.javakaffee.kryoserializers
Class CopyForIterateCollectionSerializer

java.lang.Object
  extended by com.esotericsoftware.kryo.Serializer
      extended by com.esotericsoftware.kryo.serialize.CollectionSerializer
          extended by de.javakaffee.kryoserializers.CopyForIterateCollectionSerializer

public class CopyForIterateCollectionSerializer
extends com.esotericsoftware.kryo.serialize.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

Constructor Summary
CopyForIterateCollectionSerializer(com.esotericsoftware.kryo.Kryo kryo)
           
 
Method Summary
 void writeObjectData(ByteBuffer buffer, Object object)
           
 
Methods inherited from class com.esotericsoftware.kryo.serialize.CollectionSerializer
readObjectData, setElementClass, setElementClass, setElementsCanBeNull, setLength
 
Methods inherited from class com.esotericsoftware.kryo.Serializer
isFinal, newInstance, readObject, setCanBeNull, writeObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CopyForIterateCollectionSerializer

public CopyForIterateCollectionSerializer(com.esotericsoftware.kryo.Kryo kryo)
Method Detail

writeObjectData

public void writeObjectData(ByteBuffer buffer,
                            Object object)
Overrides:
writeObjectData in class com.esotericsoftware.kryo.serialize.CollectionSerializer


Copyright © 2010-2011. All Rights Reserved.