Package org.apache.kafka.streams.query
Class KeyQuery<K,V>
java.lang.Object
org.apache.kafka.streams.query.KeyQuery<K,V>
- Type Parameters:
K
- Type of keysV
- Type of values
- All Implemented Interfaces:
Query<V>
Interactive query for retrieving a single record based on its key.
-
Method Summary
Modifier and TypeMethodDescriptiongetKey()
Return the key that was specified for this query.boolean
The flag whether to skip the cache or not during query evaluation.Specifies that the cache should be skipped during query evaluation.static <K,
V> KeyQuery<K, V> withKey
(K key) Creates a query that will retrieve the record identified bykey
if it exists (ornull
otherwise).
-
Method Details
-
withKey
Creates a query that will retrieve the record identified bykey
if it exists (ornull
otherwise).- Type Parameters:
K
- The type of the keyV
- The type of the value that will be retrieved- Parameters:
key
- The key to retrieve
-
skipCache
Specifies that the cache should be skipped during query evaluation. This means, that the query will always get forwarded to the underlying store. -
getKey
Return the key that was specified for this query.- Returns:
- The key that was specified for this query.
-
isSkipCache
public boolean isSkipCache()The flag whether to skip the cache or not during query evaluation.
-