Package org.apache.kafka.streams.state
Interface ReadOnlySessionStore<K,AGG>
-
- Type Parameters:
K
- the key typeAGG
- the aggregated value type
- All Known Subinterfaces:
SessionStore<K,AGG>
- All Known Implementing Classes:
CompositeReadOnlySessionStore
,InMemorySessionStore
,MeteredSessionStore
,RocksDBSessionStore
public interface ReadOnlySessionStore<K,AGG>
A session store that only supports read operations. Implementations should be thread-safe as concurrent reads and writes are expected.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description KeyValueIterator<Windowed<K>,AGG>
fetch(K key)
Retrieve all aggregated sessions for the provided key.KeyValueIterator<Windowed<K>,AGG>
fetch(K from, K to)
Retrieve all aggregated sessions for the given range of keys.
-
-
-
Method Detail
-
fetch
KeyValueIterator<Windowed<K>,AGG> fetch(K key)
Retrieve all aggregated sessions for the provided key. This iterator must be closed after use. For each key, the iterator guarantees ordering of sessions, starting from the oldest/earliest available session to the newest/latest session.- Parameters:
key
- record key to find aggregated session values for- Returns:
- KeyValueIterator containing all sessions for the provided key.
- Throws:
NullPointerException
- If null is used for key.
-
fetch
KeyValueIterator<Windowed<K>,AGG> fetch(K from, K to)
Retrieve all aggregated sessions for the given range of keys. This iterator must be closed after use. For each key, the iterator guarantees ordering of sessions, starting from the oldest/earliest available session to the newest/latest session.- Parameters:
from
- first key in the range to find aggregated session values forto
- last key in the range to find aggregated session values for- Returns:
- KeyValueIterator containing all sessions for the provided key.
- Throws:
NullPointerException
- If null is used for any of the keys.
-
-