Class CompatibleFieldSerializer.CompatibleFieldSerializerConfig
- java.lang.Object
-
- com.esotericsoftware.kryo.serializers.FieldSerializer.FieldSerializerConfig
-
- com.esotericsoftware.kryo.serializers.CompatibleFieldSerializer.CompatibleFieldSerializerConfig
-
- All Implemented Interfaces:
java.lang.Cloneable
- Enclosing class:
- CompatibleFieldSerializer<T>
public static class CompatibleFieldSerializer.CompatibleFieldSerializerConfig extends FieldSerializer.FieldSerializerConfig
Configuration for CompatibleFieldSerializer instances.
-
-
Constructor Summary
Constructors Constructor Description CompatibleFieldSerializerConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompatibleFieldSerializer.CompatibleFieldSerializerConfig
clone()
boolean
getChunkedEncoding()
int
getChunkSize()
boolean
getReadUnknownTagData()
void
setChunkedEncoding(boolean chunked)
When true, fields are written with chunked encoding to allow unknown field data to be skipped.void
setChunkSize(int chunkSize)
The maximum size of each chunk for chunked encoding.void
setReadUnknownFieldData(boolean readUnknownTagData)
When false and encountering an unknown field, an exception is thrown or, ifchunked encoding
is enabled, the data is skipped.-
Methods inherited from class com.esotericsoftware.kryo.serializers.FieldSerializer.FieldSerializerConfig
getCopyTransient, getExtendedFieldNames, getFieldsCanBeNull, getFixedFieldTypes, getIgnoreSyntheticFields, getSerializeTransient, getSetFieldsAsAccessible, getVariableLengthEncoding, setCopyTransient, setExtendedFieldNames, setFieldsAsAccessible, setFieldsCanBeNull, setFixedFieldTypes, setIgnoreSyntheticFields, setSerializeTransient, setVariableLengthEncoding
-
-
-
-
Method Detail
-
clone
public CompatibleFieldSerializer.CompatibleFieldSerializerConfig clone()
- Overrides:
clone
in classFieldSerializer.FieldSerializerConfig
-
setReadUnknownFieldData
public void setReadUnknownFieldData(boolean readUnknownTagData)
When false and encountering an unknown field, an exception is thrown or, ifchunked encoding
is enabled, the data is skipped.When true, the type of each field value is written before the value. When an unknown field is encountered, an attempt to read the data is made so if it is a reference then any other values in the object graph referencing that data can be deserialized. If reading the data fails (eg the class is unknown or has been removed) then an exception is thrown or, if
chunked encoding
is enabled, the data is skipped.In either case, if the data is skipped and
references
are enabled, then any references in the skipped data are not read and further deserialization receive the wrong references and fail.Default is true.
-
getReadUnknownTagData
public boolean getReadUnknownTagData()
-
setChunkedEncoding
public void setChunkedEncoding(boolean chunked)
When true, fields are written with chunked encoding to allow unknown field data to be skipped. Default is false.- See Also:
setReadUnknownFieldData(boolean)
-
getChunkedEncoding
public boolean getChunkedEncoding()
-
setChunkSize
public void setChunkSize(int chunkSize)
The maximum size of each chunk for chunked encoding. Default is 1024.
-
getChunkSize
public int getChunkSize()
-
-