THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block |
---|
/** * Interactive query for issuing range queries and scans over KeyValue stores. * <p> * A range query retrieves a set of records, specified using an upper and/or lower bound on the keys. * <p> * A scan query retrieves all records contained in the store. * <p> */ @Evolving public final class RangeQuery<K, V> implements Query<KeyValueIterator<K, V>> { ... /** * Determines if the serialized byte[] of the privatekeys finalin boolean isKeyAscending; /**ascending or descending or unordered order. * Order Determinesis based ifon the queryserialized byte[] of the keys, are in ascendingnot the 'logical' key order. * @return true if ascending, false otherwise return the order of returned records based on the serialized byte[] of the keys (can be unordered, or in ascending or in descending order). */ public booleanResultOrder isKeyAscendingresultOrder(); /** * 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 RangeQuery<K, V> withDescendingKeys() /** * Set the query to return the serialized byte[] of the keys in descending ascending order. * Order is based on the serialized byte[] of the keys, not the 'logical' key order. * @return a new RangeQuery instance with descendingascending flag set. */ public RangeQuery<K, V> withDescendingKeyswithAscendingKeys(); ... } |
According to KIP-968, we introduce a public enum ResultOrder.
ResultOrder enum
It helps with specifying the order of the returned results by the query.
...