Class SynchronizedCollectionSerializers
- java.lang.Object
-
- com.esotericsoftware.kryo.serializers.SynchronizedCollectionSerializers
-
public final class SynchronizedCollectionSerializers extends Object
Serializer for synchronized Collections and Maps created via Collections.
-
-
Constructor Summary
Constructors Constructor Description SynchronizedCollectionSerializers()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidaddDefaultSerializers(Kryo kryo)Adding default serializers for synchronized Collections and Maps created viaCollections.static voidregister(Kryo kryo)Registers serializers for synchronized Collections and Maps created viaCollectionsin a fixed order, so the registration IDs are the same on all Java versions: synchronizedCollection, synchronizedList of aRandomAccesslist, synchronizedList of another list, synchronizedSet, synchronizedSortedSet, synchronizedMap, synchronizedSortedMap, synchronizedNavigableSet and synchronizedNavigableMap.static voidregisterSerializers(Kryo kryo)Deprecated.Useregister(Kryo), which registers the classes in a fixed order.
-
-
-
Method Detail
-
register
public static void register(Kryo kryo)
Registers serializers for synchronized Collections and Maps created viaCollectionsin a fixed order, so the registration IDs are the same on all Java versions: synchronizedCollection, synchronizedList of aRandomAccesslist, synchronizedList of another list, synchronizedSet, synchronizedSortedSet, synchronizedMap, synchronizedSortedMap, synchronizedNavigableSet and synchronizedNavigableMap.
-
registerSerializers
@Deprecated public static void registerSerializers(Kryo kryo)
Deprecated.Useregister(Kryo), which registers the classes in a fixed order.Registering serializers for synchronized Collections and Maps created viaCollections.The registration IDs of these classes depend on the JVM, eg the Java version, so data written on one JVM may be read as a different collection type on another.
-
addDefaultSerializers
public static void addDefaultSerializers(Kryo kryo)
Adding default serializers for synchronized Collections and Maps created viaCollections.- See Also:
Collections.synchronizedCollection(Collection),Collections.synchronizedList(List),Collections.synchronizedSet(Set),Collections.synchronizedSortedSet(SortedSet),Collections.synchronizedMap(Map),Collections.synchronizedSortedMap(SortedMap),Collections.synchronizedNavigableSet(NavigableSet),Collections.synchronizedNavigableMap(NavigableMap)
-
-