THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
public class WindowRangeQuery<K, V> implements Query<KeyValueIterator<Windowed<K>, V>> { ... private final Optional<K> keyTo; //newly added public static <K, V> WindowRangeQuery<K, V> withWindowKeyRange(final K keyFrom, final K keyTo, final Instant timeFrom, final Instant timeTo) public Optional<K> getKeyFromlowerKeyBound() public Optional<K> getKeyToupperKeyBound() @Deprecated public Optional<Instant> getTimeFrom() public Optional<Instant> timeFrom() @Deprecated public Optional<Instant> getTimeTo() public Optional<Instant> TimeTo() @Override public String toString() } |
...
- Utilizing the existing
WindowRangeQuery
class, we can make some modifications to realize the concepts ofKeyValueIterator<Windowed<K>, V> fetch(K keyFrom, K keyTo, Instant timeFrom, Instant timeTo)
. - We want to deprecate
WindowKeyQuery
class
Examples
The following example illustrates the use of the WindowRangeQuery class to query a kv-store or ts kv-store.
withWindowKeyRange(2, 2, time=2023-01-01T10:05:00.00Z, time=2023-01-01T10:10:00.00Z), the result is (4, 5)
...