Class KafkaStore<K,V>
java.lang.Object
io.confluent.kafka.schemaregistry.storage.KafkaStore<K,V>
- All Implemented Interfaces:
Store<K,,V> AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionKafkaStore(SchemaRegistryConfig config, StoreUpdateHandler<K, V> storeUpdateHandler, Serializer<K, V> serializer, Store<K, V> localStore, K noopKey) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvoidclose()voidflush()Iterator over keys in the specified rangevoidinit()booleanlonglastOffset(String subject) voidvoidvoidsetLastOffset(String subject, long lastOffset) voidvoidwaitUntilKafkaReaderReachesLastOffset(int timeoutMs) Wait until the KafkaStore catches up to the last message in the Kafka topic.voidwaitUntilKafkaReaderReachesLastOffset(String subject, int timeoutMs) Wait until the KafkaStore catches up to the last message for the given subject.Methods 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.Store
isPersistent
-
Constructor Details
-
KafkaStore
public KafkaStore(SchemaRegistryConfig config, StoreUpdateHandler<K, V> storeUpdateHandler, Serializer<K, throws SchemaRegistryExceptionV> serializer, Store<K, V> localStore, K noopKey) - Throws:
SchemaRegistryException
-
-
Method Details
-
init
- Specified by:
initin interfaceStore<K,V> - Throws:
StoreInitializationException
-
addSchemaRegistryConfigsToClientProperties
public static void addSchemaRegistryConfigsToClientProperties(SchemaRegistryConfig config, Properties props) -
waitUntilKafkaReaderReachesLastOffset
Wait until the KafkaStore catches up to the last message in the Kafka topic.- Throws:
StoreException
-
waitUntilKafkaReaderReachesLastOffset
public void waitUntilKafkaReaderReachesLastOffset(String subject, int timeoutMs) throws StoreException Wait until the KafkaStore catches up to the last message for the given subject.- Throws:
StoreException
-
markLastWrittenOffsetInvalid
public void markLastWrittenOffsetInvalid() -
get
- Specified by:
getin interfaceStore<K,V> - Throws:
StoreException
-
put
- Specified by:
putin interfaceStore<K,V> - Throws:
StoreTimeoutExceptionStoreException
-
getAll
Description copied from interface:StoreIterator over keys in the specified range- Specified by:
getAllin interfaceStore<K,V> - Parameters:
key1- If key1 is null, start from the first key in sorted orderkey2- If key2 is null, end at the last key- Returns:
- Iterator over keys in the half-open interval [key1, key2). If both keys are null, return an iterator over all keys in the database
- Throws:
StoreException
-
putAll
- Specified by:
putAllin interfaceStore<K,V> - Throws:
StoreException
-
delete
- Specified by:
deletein interfaceStore<K,V> - Throws:
StoreException
-
getAllKeys
- Specified by:
getAllKeysin interfaceStore<K,V> - Throws:
StoreException
-
flush
- Specified by:
flushin interfaceStore<K,V> - Throws:
StoreException
-
close
public void close() -
waitForInit
- Throws:
InterruptedException
-
initialized
public boolean initialized() -
lastOffset
-
setLastOffset
-
leaderLock
-
lockFor
-