Package com.prineside.tdi2.managers
Class NetworkManager.KryoForState
java.lang.Object
com.esotericsoftware.kryo.Kryo
com.prineside.tdi2.managers.NetworkManager.KryoForState
- Enclosing class:
- NetworkManager
public class NetworkManager.KryoForState
extends com.esotericsoftware.kryo.Kryo
-
Field Summary
Fields inherited from class com.esotericsoftware.kryo.Kryo
NOT_NULL, NULL
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.esotericsoftware.kryo.Registration
getRegistration
(Class type) If the class is not registered andKryo.setRegistrationRequired(boolean)
is false, it is automatically registered using thedefault serializer
.boolean
hasRegistration
(Class type) com.esotericsoftware.kryo.Registration
register
(com.esotericsoftware.kryo.Registration registration) Stores the specified registration.com.esotericsoftware.kryo.Registration
Registers the class using the lowest, next available integer ID and the specified serializer.Methods inherited from class com.esotericsoftware.kryo.Kryo
addDefaultSerializer, addDefaultSerializer, addDefaultSerializer, copy, copy, copyShallow, copyShallow, getClassLoader, getClassResolver, getContext, getDefaultSerializer, getDepth, getGenerics, getGraphContext, getInstantiatorStrategy, getNextRegistrationId, getOriginalToCopyMap, getReferenceResolver, getReferences, getRegistration, getSerializer, getWarnUnregisteredClasses, isClosure, isFinal, isRegistrationRequired, newInstance, readClass, readClassAndObject, readObject, readObject, readObjectOrNull, readObjectOrNull, reference, register, register, register, reset, setAutoReset, setClassLoader, setCopyReferences, setDefaultSerializer, setDefaultSerializer, setInstantiatorStrategy, setMaxDepth, setOptimizedGenerics, setReferenceResolver, setReferences, setRegistrationRequired, setWarnUnregisteredClasses, writeClass, writeClassAndObject, writeObject, writeObject, writeObjectOrNull, writeObjectOrNull
-
Constructor Details
-
KryoForState
public KryoForState()
-
-
Method Details
-
register
public com.esotericsoftware.kryo.Registration register(com.esotericsoftware.kryo.Registration registration) Description copied from class:com.esotericsoftware.kryo.Kryo
Stores the specified registration. If the ID is already in use by the same type, the old entry is overwritten. Registering a primitive also affects the corresponding primitive wrapper.IDs must be the same at deserialization as they were for serialization.
Registration can be suclassed to efficiently store per type information, accessible in serializers via
Kryo.getRegistration(Class)
.- Overrides:
register
in classcom.esotericsoftware.kryo.Kryo
-
register
public com.esotericsoftware.kryo.Registration register(Class type, com.esotericsoftware.kryo.Serializer serializer) Description copied from class:com.esotericsoftware.kryo.Kryo
Registers the class using the lowest, next available integer ID and the specified serializer. If the class is already registered, the existing entry is updated with the new serializer. Registering a primitive also affects the corresponding primitive wrapper.Because the ID assigned is affected by the IDs registered before it, the order classes are registered is important when using this method. The order must be the same at deserialization as it was for serialization.
- Overrides:
register
in classcom.esotericsoftware.kryo.Kryo
-
hasRegistration
-
getRegistration
Description copied from class:com.esotericsoftware.kryo.Kryo
If the class is not registered andKryo.setRegistrationRequired(boolean)
is false, it is automatically registered using thedefault serializer
.- Overrides:
getRegistration
in classcom.esotericsoftware.kryo.Kryo
- See Also:
-
ClassResolver.getRegistration(Class)
-