@Public public interface NormalizableKey<T> extends Comparable<T>, Key<T>
The latter depends on whether the normalized key covers the entire key or is just a prefix of the key. A normalized key is considered a prefix, if its length is less than the maximal normalized key length.
|Modifier and Type||Method and Description|
Writes a normalized key for the given record into the target byte array, starting at the specified position an writing exactly the given number of bytes.
Gets the maximal length of normalized keys that the data type would produce to determine the order of instances solely by the normalized key.
Integer.MAX_VALUE is interpreted as infinite.
For example, 32 bit integers return four, while Strings (potentially unlimited in length) return
void copyNormalizedKey(MemorySegment memory, int offset, int len)
int byteI = bytes[i] & 0xFF;
If the meaningful part of the normalized key takes less than the given number of bytes, then it must be padded.
Padding is typically required for variable length data types, such as strings. The padding uses a special
0xff, depending on whether shorter values are sorted to the beginning or
memory- The memory segment to put the normalized key bytes into.
offset- The offset in the byte array where the normalized key's bytes should start.
len- The number of bytes to put.
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.