Class MemoryNavigableLRUCache
- java.lang.Object
-
- org.apache.kafka.streams.state.internals.MemoryLRUCache
-
- org.apache.kafka.streams.state.internals.MemoryNavigableLRUCache
-
- All Implemented Interfaces:
StateStore
,KeyValueStore<org.apache.kafka.common.utils.Bytes,byte[]>
,ReadOnlyKeyValueStore<org.apache.kafka.common.utils.Bytes,byte[]>
public class MemoryNavigableLRUCache extends MemoryLRUCache
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.kafka.streams.state.internals.MemoryLRUCache
MemoryLRUCache.EldestEntryRemovalListener
-
-
Field Summary
-
Fields inherited from class org.apache.kafka.streams.state.internals.MemoryLRUCache
map
-
-
Constructor Summary
Constructors Constructor Description MemoryNavigableLRUCache(String name, int maxCacheSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyValueIterator<org.apache.kafka.common.utils.Bytes,byte[]>
all()
Return an iterator over all keys in this store.KeyValueIterator<org.apache.kafka.common.utils.Bytes,byte[]>
range(org.apache.kafka.common.utils.Bytes from, org.apache.kafka.common.utils.Bytes 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
-
-
-
-
Constructor Detail
-
MemoryNavigableLRUCache
public MemoryNavigableLRUCache(String name, int maxCacheSize)
-
-
Method Detail
-
range
public KeyValueIterator<org.apache.kafka.common.utils.Bytes,byte[]> range(org.apache.kafka.common.utils.Bytes from, org.apache.kafka.common.utils.Bytes 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<org.apache.kafka.common.utils.Bytes,byte[]>
- Overrides:
range
in classMemoryLRUCache
- 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<org.apache.kafka.common.utils.Bytes,byte[]> 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<org.apache.kafka.common.utils.Bytes,byte[]>
- Overrides:
all
in classMemoryLRUCache
- Returns:
- An iterator of all key/value pairs in the store.
-
-