Class KafkaStoreMessageHandler
java.lang.Object
io.confluent.kafka.schemaregistry.storage.KafkaStoreMessageHandler
- All Implemented Interfaces:
SchemaUpdateHandler,StoreUpdateHandler<SchemaRegistryKey,,SchemaRegistryValue> Closeable,AutoCloseable,org.apache.kafka.common.Configurable
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.confluent.kafka.schemaregistry.storage.StoreUpdateHandler
StoreUpdateHandler.ValidationStatus -
Field Summary
Fields inherited from interface io.confluent.kafka.schemaregistry.storage.StoreUpdateHandler
SCHEMA_REGISTRY -
Constructor Summary
ConstructorsConstructorDescriptionKafkaStoreMessageHandler(SchemaRegistry schemaRegistry, LookupCache<SchemaRegistryKey, SchemaRegistryValue> lookupCache, IdGenerator idGenerator) -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidcanonicalize(SchemaProvider schemaProvider, SchemaValue schemaValue) checkpoint(int count) Retrieve the offsets to checkpoint.voidhandleUpdate(SchemaRegistryKey key, SchemaRegistryValue value, SchemaRegistryValue oldValue, org.apache.kafka.common.TopicPartition tp, long offset, long timestamp) Invoked on every new schema written to the Kafka storevalidateUpdate(SchemaRegistryKey key, SchemaRegistryValue value, org.apache.kafka.common.TopicPartition tp, long offset, long timestamp) Invoked before every new K,V pair written to the storeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.confluent.kafka.schemaregistry.storage.StoreUpdateHandler
cacheInitialized, close, configure, endBatch, init, startBatch
-
Constructor Details
-
KafkaStoreMessageHandler
public KafkaStoreMessageHandler(SchemaRegistry schemaRegistry, LookupCache<SchemaRegistryKey, SchemaRegistryValue> lookupCache, IdGenerator idGenerator)
-
-
Method Details
-
validateUpdate
public StoreUpdateHandler.ValidationStatus validateUpdate(SchemaRegistryKey key, SchemaRegistryValue value, org.apache.kafka.common.TopicPartition tp, long offset, long timestamp) Invoked before every new K,V pair written to the store- Specified by:
validateUpdatein interfaceStoreUpdateHandler<SchemaRegistryKey,SchemaRegistryValue> - Parameters:
key- Key associated with the datavalue- Data written to the storetp- Topic-partitionoffset- Offset of recordtimestamp- Timestamp of record
-
canonicalize
-
handleUpdate
public void handleUpdate(SchemaRegistryKey key, SchemaRegistryValue value, SchemaRegistryValue oldValue, org.apache.kafka.common.TopicPartition tp, long offset, long timestamp) Invoked on every new schema written to the Kafka store- Specified by:
handleUpdatein interfaceStoreUpdateHandler<SchemaRegistryKey,SchemaRegistryValue> - Parameters:
key- Key associated with the schema.value- Value written to the Kafka lookupCacheoldValue- the previous value associated with key, or null if there was no mapping for keytp- Topic-partitionoffset- Offset of recordtimestamp- Timestamp of record
-
checkpoint
Description copied from interface:StoreUpdateHandlerRetrieve the offsets to checkpoint.- Specified by:
checkpointin interfaceStoreUpdateHandler<SchemaRegistryKey,SchemaRegistryValue> - Parameters:
count- batch count- Returns:
- the offsets to checkpoint, or null
-