Class AttributeSerializer<T,U extends ConfigurationInfo,B extends ConfigurationBuilderInfo>
- java.lang.Object
-
- org.infinispan.commons.configuration.attributes.AttributeSerializer<T,U,B>
-
- Direct Known Subclasses:
ClassAttributeSerializer
,DefaultSerializer
,NullAttributeSerializer
public abstract class AttributeSerializer<T,U extends ConfigurationInfo,B extends ConfigurationBuilderInfo> extends java.lang.Object
HandlesAttribute
serialization to external format.- Since:
- 10.0
-
-
Constructor Summary
Constructors Constructor Description AttributeSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRead(java.lang.String name, AttributeDefinition attributeDefinition)
java.lang.String
getSerializationName(Attribute<T> attribute, U configurationElement)
java.lang.Object
getSerializationValue(Attribute<T> attribute, U configurationElement)
java.lang.Object
readAttributeValue(java.lang.String enclosingElement, AttributeDefinition attributeDefinition, java.lang.Object attrValue, B builderInfo)
Read attribute value from serialized format, ifcanRead(String, AttributeDefinition)
is true for this instance of serializer.
-
-
-
Method Detail
-
canRead
public boolean canRead(java.lang.String name, AttributeDefinition attributeDefinition)
-
getSerializationName
public java.lang.String getSerializationName(Attribute<T> attribute, U configurationElement)
- Returns:
- The desired serialised attribute name or null if the attribute name is to be omitted and the value will be written directly
-
getSerializationValue
public java.lang.Object getSerializationValue(Attribute<T> attribute, U configurationElement)
- Returns:
- The attribute value to be serialized.
-
readAttributeValue
public java.lang.Object readAttributeValue(java.lang.String enclosingElement, AttributeDefinition attributeDefinition, java.lang.Object attrValue, B builderInfo)
Read attribute value from serialized format, ifcanRead(String, AttributeDefinition)
is true for this instance of serializer.- Parameters:
enclosingElement
- The parent element where the attribute is located.attributeDefinition
- The serialized attribute definition.attrValue
- The serialize attribute value.builderInfo
- theConfigurationBuilderInfo
where the attribute is defined.- Returns:
- The attribute value deserialized.
-
-