Package org.apache.kafka.streams.query
Class RangeQuery<K,V>
java.lang.Object
org.apache.kafka.streams.query.RangeQuery<K,V>
- All Implemented Interfaces:
Query<KeyValueIterator<K,
V>>
Interactive query for issuing range queries and scans over KeyValue stores.
A range query retrieves a set of records, specified using an upper and/or lower bound on the keys.
A scan query retrieves all records contained in the store.
-
Method Summary
Modifier and TypeMethodDescriptionThe lower bound of the query, if specified.The upper bound of the query, if specifiedstatic <K,
V> RangeQuery<K, V> withLowerBound
(K lower) Interactive range query using a lower bound to filter the keys returned.static <K,
V> RangeQuery<K, V> Interactive scan query that returns all records in the store.static <K,
V> RangeQuery<K, V> withRange
(K lower, K upper) Interactive range query using a lower and upper bound to filter the keys returned.static <K,
V> RangeQuery<K, V> withUpperBound
(K upper) Interactive range query using an upper bound to filter the keys returned.
-
Method Details
-
withRange
Interactive range query using a lower and upper bound to filter the keys returned.- Type Parameters:
K
- The key typeV
- The value type- Parameters:
lower
- The key that specifies the lower bound of the rangeupper
- The key that specifies the upper bound of the range
-
withUpperBound
Interactive range query using an upper bound to filter the keys returned.- Type Parameters:
K
- The key typeV
- The value type- Parameters:
upper
- The key that specifies the upper bound of the range
-
withLowerBound
Interactive range query using a lower bound to filter the keys returned.- Type Parameters:
K
- The key typeV
- The value type- Parameters:
lower
- The key that specifies the lower bound of the range
-
withNoBounds
Interactive scan query that returns all records in the store.- Type Parameters:
K
- The key typeV
- The value type
-
getLowerBound
The lower bound of the query, if specified. -
getUpperBound
The upper bound of the query, if specified
-