public abstract class AbstractKafkaSerializer<T,U,S extends AbstractKafkaSerializer<T,U,S>> extends AbstractKafkaStrategyAwareSerDe<T,S> implements org.apache.kafka.common.serialization.Serializer<U>
REGISTRY_ARTIFACT_ID_STRATEGY_CONFIG_PARAM, REGISTRY_GLOBAL_ID_STRATEGY_CONFIG_PARAM
log, MAGIC_BYTE, REGISTRY_CACHED_CONFIG_PARAM, REGISTRY_CONFLUENT_ID_HANDLER_CONFIG_PARAM, REGISTRY_ID_HANDLER_CONFIG_PARAM, REGISTRY_URL_CONFIG_PARAM
Constructor and Description |
---|
AbstractKafkaSerializer() |
AbstractKafkaSerializer(RegistryService client) |
AbstractKafkaSerializer(RegistryService client,
ArtifactIdStrategy<T> artifactIdStrategy,
GlobalIdStrategy<T> globalIdStrategy) |
Modifier and Type | Method and Description |
---|---|
protected abstract io.apicurio.registry.types.ArtifactType |
artifactType() |
byte[] |
serialize(String topic,
U data) |
protected abstract void |
serializeData(T schema,
U data,
OutputStream out) |
protected abstract T |
toSchema(U data) |
configure, getArtifactIdStrategy, getGlobalIdStrategy, isKey, setArtifactIdStrategy, setGlobalIdStrategy, setKey
asLegacyId, close, configure, getByteBuffer, getClient, getIdHandler, instantiate, instantiate, loadClass, reset, self, setIdHandler
public AbstractKafkaSerializer()
public AbstractKafkaSerializer(RegistryService client)
public AbstractKafkaSerializer(RegistryService client, ArtifactIdStrategy<T> artifactIdStrategy, GlobalIdStrategy<T> globalIdStrategy)
protected abstract io.apicurio.registry.types.ArtifactType artifactType()
protected abstract void serializeData(T schema, U data, OutputStream out) throws IOException
IOException
Copyright © 2020 Red Hat. All rights reserved.