de.javakaffee.kryoserializers
Class CopyForIterateMapSerializer

java.lang.Object
  extended by com.esotericsoftware.kryo.Serializer
      extended by com.esotericsoftware.kryo.serialize.MapSerializer
          extended by de.javakaffee.kryoserializers.CopyForIterateMapSerializer

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

Constructor Summary
CopyForIterateMapSerializer(com.esotericsoftware.kryo.Kryo kryo)
           
 
Method Summary
 void writeObjectData(ByteBuffer buffer, Object object)
           
 
Methods inherited from class com.esotericsoftware.kryo.serialize.MapSerializer
readObjectData, setKeyClass, setKeyClass, setKeysCanBeNull, setValueClass, setValueClass, setValuesCanBeNull
 
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

CopyForIterateMapSerializer

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

writeObjectData

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


Copyright © 2010-2011. All Rights Reserved.