THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
@Evolving
public final class TimestampedKeyQuery<K, V> implements Query<ValueAndTimestamp<V>> {
...
/**
* Creates a query that will retrieve the record identified by {@code key} if it exists
* (or {@code null} otherwise).
* @param key The key to retrieve
* @param <K> The type of the key
* @param <V> The type of the value that will be retrieved
*/
public static <K, V> TimestampedKeyQuery<K, V> withKey(final K key)
/**
* Specifies that the cache should be skipped during query evaluation. This means, that the query will always
* get forwarded to the underlying store.
*/
public TimestampedKeyQuery<K, V> skipCache()
/**
* The key that was specified for this query.
*/
public K key()
/**
* The flag whether to skip the cache or not during query evaluation.
*/
public boolean isSkipCache()
} |
TimestampedRangeQuery
: Tailored for ranges with timestamps, this query will return a KeyValueIterator<K, ValueAndTimestamp<V>>
Code Block | ||||
---|---|---|---|---|
| ||||
@Evolving public final class TimestampedRangeQuery<K, V> implements Query<KeyValueIterator<K, ValueAndTimestamp<V>>> { ... /** * Interactive range query using a lower and upper bound to filter the keys returned. * @param lower The key that specifies the lower bound of the range * @param upper The key that specifies the upper bound of the range * @param <K> The key type * @param <V> The value type */ public static <K, V> TimestampedRangeQuery<K, V> withRange(final K lower, final K upper) /** * Interactive range query using an upper bound to filter the keys returned. * If both <K,V> are null, RangQuery returns a full range scan. * @param upper The key that specifies the upper bound of the range * @param <K> The key type * @param <V> The value type */ public static <K, V> TimestampedRangeQuery<K, V> withUpperBound(final K upper) { return new TimestampedRangeQuery<>(Optional.empty(), Optional.of(upper), true); } /** * Interactive range query using a lower bound to filter the keys returned. * @param lower The key that specifies the lower bound of the range * @param <K> The key type * @param <V> The value type */ public static <K, V> TimestampedRangeQuery<K, V> withLowerBound(final K lower) /** * Determines if the serialized byte[] of the keys in ascending order. * Order is based on the serialized byte[] of the keys, not the 'logical' key order. * @return true if ascending, false otherwise. */ public boolean isKeyAscending() /** * Set the query to return the serialized byte[] of the keys in descending order. * Order is based on the serialized byte[] of the keys, not the 'logical' key order. * @return a new RangeQuery instance with descending flag set. */ public TimestampedRangeQuery<K, V> withDescendingKeys() /** * Interactive scan query that returns all records in the store. * @param <K> The key type * @param <V> The value type */ public static <K, V> TimestampedRangeQuery<K, V> withNoBounds() /** * The lower bound of the query, if specified. */ public Optional<K> lowerBound() /** * The upper bound of the query, if specified */ public Optional<K> upperBound() } |
Compatibility, Deprecation, and Migration Plan
...