public class KafkaStore<K,V> extends Object implements Store<K,V>
| Constructor and Description |
|---|
KafkaStore(SchemaRegistryConfig config,
StoreUpdateHandler<K,V> storeUpdateHandler,
Serializer<K,V> serializer,
Store<K,V> localStore,
K noopKey) |
| Modifier and Type | Method and Description |
|---|---|
static void |
addSchemaRegistryConfigsToClientProperties(SchemaRegistryConfig config,
Properties props) |
void |
close() |
V |
delete(K key) |
void |
flush() |
V |
get(K key) |
CloseableIterator<V> |
getAll(K key1,
K key2)
Iterator over keys in the specified range
|
CloseableIterator<K> |
getAllKeys() |
void |
init() |
boolean |
initialized() |
long |
lastOffset(String subject) |
Lock |
leaderLock() |
Lock |
lockFor(String subject) |
void |
markLastWrittenOffsetInvalid() |
V |
put(K key,
V value) |
void |
putAll(Map<K,V> entries) |
void |
setLastOffset(String subject,
long lastOffset) |
void |
waitForInit() |
void |
waitUntilKafkaReaderReachesLastOffset(int timeoutMs)
Wait until the KafkaStore catches up to the last message in the Kafka topic.
|
void |
waitUntilKafkaReaderReachesLastOffset(String subject,
int timeoutMs)
Wait until the KafkaStore catches up to the last message for the given subject.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisPersistentpublic KafkaStore(SchemaRegistryConfig config, StoreUpdateHandler<K,V> storeUpdateHandler, Serializer<K,V> serializer, Store<K,V> localStore, K noopKey) throws SchemaRegistryException
SchemaRegistryExceptionpublic void init()
throws StoreInitializationException
init in interface Store<K,V>StoreInitializationExceptionpublic static void addSchemaRegistryConfigsToClientProperties(SchemaRegistryConfig config, Properties props)
public void waitUntilKafkaReaderReachesLastOffset(int timeoutMs)
throws StoreException
StoreExceptionpublic void waitUntilKafkaReaderReachesLastOffset(String subject, int timeoutMs) throws StoreException
StoreExceptionpublic void markLastWrittenOffsetInvalid()
public V get(K key) throws StoreException
get in interface Store<K,V>StoreExceptionpublic V put(K key, V value) throws StoreTimeoutException, StoreException
put in interface Store<K,V>StoreTimeoutExceptionStoreExceptionpublic CloseableIterator<V> getAll(K key1, K key2) throws StoreException
StoregetAll in interface Store<K,V>key1 - If key1 is null, start from the first key in sorted orderkey2 - If key2 is null, end at the last keyStoreExceptionpublic void putAll(Map<K,V> entries) throws StoreException
putAll in interface Store<K,V>StoreExceptionpublic V delete(K key) throws StoreException
delete in interface Store<K,V>StoreExceptionpublic CloseableIterator<K> getAllKeys() throws StoreException
getAllKeys in interface Store<K,V>StoreExceptionpublic void flush()
throws StoreException
flush in interface Store<K,V>StoreExceptionpublic void close()
public void waitForInit()
throws InterruptedException
InterruptedExceptionpublic boolean initialized()
public long lastOffset(String subject)
public void setLastOffset(String subject, long lastOffset)
public Lock leaderLock()
Copyright © 2026 Confluent, Inc.. All rights reserved.