Class MemoryNavigableLRUCache<K,V>
- java.lang.Object
-
- org.apache.kafka.streams.state.internals.MemoryLRUCache<K,V>
-
- org.apache.kafka.streams.state.internals.MemoryNavigableLRUCache<K,V>
-
- All Implemented Interfaces:
StateStore
,KeyValueStore<K,V>
,ReadOnlyKeyValueStore<K,V>
public class MemoryNavigableLRUCache<K,V> extends MemoryLRUCache<K,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.kafka.streams.state.internals.MemoryLRUCache
MemoryLRUCache.EldestEntryRemovalListener<K,V>
-
-
Field Summary
-
Fields inherited from class org.apache.kafka.streams.state.internals.MemoryLRUCache
map
-
-
Constructor Summary
Constructors Constructor Description MemoryNavigableLRUCache(java.lang.String name, int maxCacheSize, org.apache.kafka.common.serialization.Serde<K> keySerde, org.apache.kafka.common.serialization.Serde<V> valueSerde)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyValueIterator<K,V>
all()
Return an iterator over all keys in this store.KeyValueIterator<K,V>
range(K from, K to)
Get an iterator over a given range of keys.-
Methods inherited from class org.apache.kafka.streams.state.internals.MemoryLRUCache
approximateNumEntries, close, delete, flush, get, init, isOpen, name, persistent, put, putAll, putIfAbsent, size
-
-
-
-
Method Detail
-
range
public KeyValueIterator<K,V> range(K from, K to)
Description copied from interface:ReadOnlyKeyValueStore
Get an iterator over a given range of keys. This iterator must be closed after use. The returned iterator must be safe fromConcurrentModificationException
s and must not return null values. No ordering guarantees are provided.- Specified by:
range
in interfaceReadOnlyKeyValueStore<K,V>
- Overrides:
range
in classMemoryLRUCache<K,V>
- Parameters:
from
- The first key that could be in the rangeto
- The last key that could be in the range- Returns:
- The iterator for this range.
-
all
public KeyValueIterator<K,V> all()
Description copied from interface:ReadOnlyKeyValueStore
Return an iterator over all keys in this store. This iterator must be closed after use. The returned iterator must be safe fromConcurrentModificationException
s and must not return null values. No ordering guarantees are provided.- Specified by:
all
in interfaceReadOnlyKeyValueStore<K,V>
- Overrides:
all
in classMemoryLRUCache<K,V>
- Returns:
- An iterator of all key/value pairs in the store.
-
-