Class TaggedFieldSerializerConfig
- java.lang.Object
-
- com.esotericsoftware.kryo.serializers.FieldSerializerConfig
-
- com.esotericsoftware.kryo.serializers.TaggedFieldSerializerConfig
-
- All Implemented Interfaces:
java.lang.Cloneable
public class TaggedFieldSerializerConfig extends FieldSerializerConfig
Configuration for TaggedFieldSerializer instances.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
skipUnknownTags
-
Constructor Summary
Constructors Constructor Description TaggedFieldSerializerConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TaggedFieldSerializerConfig
clone()
boolean
getSkipUnknownTags()
Whether the TaggedFieldSerializers should attempt to skip reading the data of unknown tags, rather than throwing a KryoException.void
setSkipUnknownTags(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 com.esotericsoftware.kryo.serializers.FieldSerializerConfig
getCachedFieldNameStrategy, getCopyTransient, getFieldsCanBeNull, getFixedFieldTypes, getIgnoreSyntheticFields, getOptimizedGenerics, getSerializeTransient, getSetFieldsAsAccessible, setCachedFieldNameStrategy, setCopyTransient, setFieldsAsAccessible, setFieldsCanBeNull, setFixedFieldTypes, setIgnoreSyntheticFields, setOptimizedGenerics, setSerializeTransient
-
-
-
-
Method Detail
-
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
public TaggedFieldSerializerConfig clone()
- Overrides:
clone
in classFieldSerializerConfig
-
-