K
- Type of keysV
- Type of values@InterfaceStability.Evolving public final class TimestampedRangeQuery<K,V> extends Object implements Query<KeyValueIterator<K,ValueAndTimestamp<V>>>
TimestampedKeyValueStore
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.
Keys' order is based on the serialized byte[] of the keys, not the 'logical' key order.
Modifier and Type | Method and Description |
---|---|
Optional<K> |
lowerBound()
The lower bound of the query, if specified.
|
ResultOrder |
resultOrder()
Determines if the serialized byte[] of the keys in ascending or descending or unordered order.
|
Optional<K> |
upperBound()
The upper bound of the query, if specified
|
TimestampedRangeQuery<K,V> |
withAscendingKeys()
Set the query to return the serialized byte[] of the keys in ascending order.
|
TimestampedRangeQuery<K,V> |
withDescendingKeys()
Set the query to return the serialized byte[] of the keys in descending order.
|
static <K,V> TimestampedRangeQuery<K,V> |
withLowerBound(K lower)
Interactive range query using a lower bound to filter the keys returned.
|
static <K,V> TimestampedRangeQuery<K,V> |
withNoBounds()
Interactive scan query that returns all records in the store.
|
static <K,V> TimestampedRangeQuery<K,V> |
withRange(K lower,
K upper)
Interactive range query using a lower and upper bound to filter the keys returned.
|
static <K,V> TimestampedRangeQuery<K,V> |
withUpperBound(K upper)
Interactive range query using an upper bound to filter the keys returned.
|
public static <K,V> TimestampedRangeQuery<K,V> withRange(K lower, K upper)
K
- The key typeV
- The value typelower
- The key that specifies the lower bound of the rangeupper
- The key that specifies the upper bound of the rangepublic static <K,V> TimestampedRangeQuery<K,V> withUpperBound(K upper)
<K,V>
are null, RangQuery returns a full range scan.K
- The key typeV
- The value typeupper
- The key that specifies the upper bound of the rangepublic static <K,V> TimestampedRangeQuery<K,V> withLowerBound(K lower)
K
- The key typeV
- The value typelower
- The key that specifies the lower bound of the rangepublic ResultOrder resultOrder()
public TimestampedRangeQuery<K,V> withDescendingKeys()
public TimestampedRangeQuery<K,V> withAscendingKeys()
public static <K,V> TimestampedRangeQuery<K,V> withNoBounds()
K
- The key typeV
- The value type