public class GlueSchemaRegistryDeserializationFacade extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
protected com.google.common.cache.LoadingCache<UUID,Schema> |
cache |
| Constructor and Description |
|---|
GlueSchemaRegistryDeserializationFacade(@NonNull GlueSchemaRegistryConfiguration configuration,
@NonNull software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider) |
GlueSchemaRegistryDeserializationFacade(Map<String,?> configs,
Properties properties,
@NonNull software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialProvider,
AWSSchemaRegistryClient schemaRegistryClient)
Constructor accepting various dependencies.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canDeserialize(byte[] data)
Returns if the given data array can be deserialized.
|
void |
close()
Resource clean up for Closeable.
|
Object |
deserialize(@NonNull AWSDeserializerInput deserializerInput)
De-serializes the given data and returns an Object.
|
byte[] |
getActualData(byte[] data) |
Schema |
getSchema(@NonNull byte[] data) |
String |
getSchemaDefinition(@NonNull byte[] data)
Fetches the schema definition for a the serialized data.
|
String |
getSchemaDefinition(@NonNull ByteBuffer buffer)
Fetches the schema definition for the serialized data.
|
void |
overrideUserAgentApp(String name)
Method to override user-agent app name for the de-serializer.
|
public GlueSchemaRegistryDeserializationFacade(Map<String,?> configs, Properties properties, @NonNull @NonNull software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialProvider, AWSSchemaRegistryClient schemaRegistryClient)
configs - configuration mapproperties - configuration propertiescredentialProvider - credentials provider for integrating with schema
registry serviceschemaRegistryClient - schema registry client for communicating with
schema registry servicepublic GlueSchemaRegistryDeserializationFacade(@NonNull
@NonNull GlueSchemaRegistryConfiguration configuration,
@NonNull
@NonNull software.amazon.awssdk.auth.credentials.AwsCredentialsProvider credentialsProvider)
public void overrideUserAgentApp(String name)
name - AppNamepublic String getSchemaDefinition(@NonNull @NonNull ByteBuffer buffer)
buffer - data for which schema definition is needed as ByteBufferGlueSchemaRegistryIncompatibleDataException - when data is incompatible with schema
registrypublic byte[] getActualData(byte[] data)
public Schema getSchema(@NonNull @NonNull byte[] data)
public String getSchemaDefinition(@NonNull @NonNull byte[] data)
data - data for which schema definition is needed as byte arrayGlueSchemaRegistryIncompatibleDataException - when data is incompatible with schema
registrypublic Object deserialize(@NonNull @NonNull AWSDeserializerInput deserializerInput) throws AWSSchemaRegistryException
deserializerInput - Input data object for deserializerAWSSchemaRegistryException - Exception during de-serializationpublic boolean canDeserialize(byte[] data)
data - byte[] of data.public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2024. All rights reserved.