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(java.lang.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
-
-
-
-
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:ReadOnlyKeyValueStoreGet an iterator over a given range of keys. This iterator must be closed after use. The returned iterator must be safe fromConcurrentModificationExceptions and must not return null values. No ordering guarantees are provided.- Specified by:
rangein interfaceReadOnlyKeyValueStore<org.apache.kafka.common.utils.Bytes,byte[]>- Overrides:
rangein 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:ReadOnlyKeyValueStoreReturn an iterator over all keys in this store. This iterator must be closed after use. The returned iterator must be safe fromConcurrentModificationExceptions and must not return null values. No ordering guarantees are provided.- Specified by:
allin interfaceReadOnlyKeyValueStore<org.apache.kafka.common.utils.Bytes,byte[]>- Overrides:
allin classMemoryLRUCache- Returns:
- An iterator of all key/value pairs in the store.
-
-