Class GlueSchemaRegistryDeserializerDataParser
java.lang.Object
com.amazonaws.services.schemaregistry.deserializers.GlueSchemaRegistryDeserializerDataParser
Parser that understands the schema registry data format and extracts schema
id from serialized data, also performs data integrity validations.
-
Method Summary
Modifier and TypeMethodDescriptiongetCompressionByte(ByteBuffer byteBuffer) Get the compression byte.getHeaderVersionByte(ByteBuffer byteBuffer) Get the header version byte.Singleton instantiation helper.byte[]getPlainData(ByteBuffer byteBuffer) getSchemaVersionId(ByteBuffer byteBuffer) Gets the schema version id embedded within the data.booleanisCompressionEnabled(ByteBuffer byteBuffer) Is Compression enabledbooleanisDataCompatible(ByteBuffer byteBuffer, StringBuilder errorBuilder) Validates the data for compatibility with schema registry.
-
Method Details
-
getInstance
Singleton instantiation helper.- Returns:
- returns a singleton instance for GlueSchemaRegistryDeserializerDataParser
-
getSchemaVersionId
Gets the schema version id embedded within the data.- Parameters:
byteBuffer- data from where schema version id has to be extracted as ByteBuffer- Returns:
- schema UUID
- Throws:
GlueSchemaRegistryIncompatibleDataException- when the data is incompatible with schema registry
-
isDataCompatible
Validates the data for compatibility with schema registry.- Parameters:
byteBuffer- input data as byte buffererrorBuilder- error message for the validation that can be used by the caller- Returns:
- true - validation success; false - otherwise
-
getPlainData
-
isCompressionEnabled
Is Compression enabled- Parameters:
byteBuffer- byte buffer- Returns:
- whether the byte buffer has been compressed
-
getCompressionByte
Get the compression byte.- Parameters:
byteBuffer- byte buffer- Returns:
- compression byte
-
getHeaderVersionByte
Get the header version byte.- Parameters:
byteBuffer- byte buffer- Returns:
- header byte
-