Class CompositeSchemaUpdateHandler
java.lang.Object
io.confluent.kafka.schemaregistry.storage.CompositeSchemaUpdateHandler
- 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcacheInitialized(Map<org.apache.kafka.common.TopicPartition, Long> checkpoints) Invoked after the cache is initialized.checkpoint(int count) Retrieve the offsets to checkpoint.voidclose()voidendBatch(int count) Invoked after a batch of updates.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 storevoidInvoked before the cache is initialized.voidstartBatch(int count) Invoked before a batch of updates.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 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
configure
-
Constructor Details
-
CompositeSchemaUpdateHandler
-
-
Method Details
-
init
public void init(Map<org.apache.kafka.common.TopicPartition, Long> checkpoints) throws StoreInitializationExceptionInvoked before the cache is initialized.- Specified by:
initin interfaceStoreUpdateHandler<SchemaRegistryKey,SchemaRegistryValue> - Throws:
StoreInitializationException
-
cacheInitialized
Invoked after the cache is initialized.- Specified by:
cacheInitializedin interfaceStoreUpdateHandler<SchemaRegistryKey,SchemaRegistryValue>
-
startBatch
public void startBatch(int count) Description copied from interface:StoreUpdateHandlerInvoked before a batch of updates.- Specified by:
startBatchin interfaceStoreUpdateHandler<SchemaRegistryKey,SchemaRegistryValue> - Parameters:
count- batch count
-
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
-
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
-
endBatch
public void endBatch(int count) Description copied from interface:StoreUpdateHandlerInvoked after a batch of updates.- Specified by:
endBatchin interfaceStoreUpdateHandler<SchemaRegistryKey,SchemaRegistryValue> - Parameters:
count- batch count
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceStoreUpdateHandler<SchemaRegistryKey,SchemaRegistryValue> - Throws:
IOException
-