Class TaggedFieldSerializerConfig
java.lang.Object
com.esotericsoftware.kryo.serializers.FieldSerializerConfig
com.esotericsoftware.kryo.serializers.TaggedFieldSerializerConfig
- All Implemented Interfaces:
Cloneable
Configuration for TaggedFieldSerializer instances.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleanWhether the TaggedFieldSerializers should attempt to skip reading the data of unknown tags, rather than throwing a KryoException.voidsetSkipUnknownTags(boolean skipUnknownTags) Set whether associated TaggedFieldSerializers should attempt to skip reading the data of unknown tags, rather than throwing a KryoException.Methods inherited from class FieldSerializerConfig
getCachedFieldNameStrategy, getCopyTransient, getFieldsCanBeNull, getFixedFieldTypes, getIgnoreSyntheticFields, getOptimizedGenerics, getSerializeTransient, getSetFieldsAsAccessible, setCachedFieldNameStrategy, setCopyTransient, setFieldsAsAccessible, setFieldsCanBeNull, setFixedFieldTypes, setIgnoreSyntheticFields, setOptimizedGenerics, setSerializeTransient
-
Field Details
-
skipUnknownTags
boolean skipUnknownTags
-
-
Constructor Details
-
TaggedFieldSerializerConfig
public TaggedFieldSerializerConfig()
-
-
Method Details
-
setSkipUnknownTags
public void setSkipUnknownTags(boolean skipUnknownTags) Set whether associated TaggedFieldSerializers should attempt to skip reading the data of unknown tags, rather than throwing a KryoException. Data can be skipped if it was tagged withTaggedFieldSerializer.Tag.annexed()set true. This enables forward compatibility.This setting is false by default.
- Parameters:
skipUnknownTags- If true, unknown field tags will be skipped, with the assumption that they are future tagged values withTaggedFieldSerializer.Tag.annexed()set true. If false KryoException will be thrown whenever unknown tags are encountered.
-
getSkipUnknownTags
public boolean getSkipUnknownTags()Whether the TaggedFieldSerializers should attempt to skip reading the data of unknown tags, rather than throwing a KryoException. The data may only be skipped if the later version of the application which created the data set those unknown tags withTaggedFieldSerializer.Tag.annexed()true. SeesetSkipUnknownTags(boolean). -
clone
- Overrides:
clonein classFieldSerializerConfig
-