Package com.apple.foundationdb.record
Class KeyRange
java.lang.Object
com.apple.foundationdb.record.KeyRange
A range within a subspace specified by two byte value endpoints.
-
Constructor Summary
ConstructorsConstructorDescriptionKeyRange
(byte[] lowKey, byte[] highKey) Creates a key range.KeyRange
(byte[] lowKey, EndpointType lowEndpoint, byte[] highKey, EndpointType highEndpoint) Creates a key range. -
Method Summary
Modifier and TypeMethodDescriptionHow the upper boundary key of the range is to be interpreted by the scan.byte[]
Returns the upper boundary of the range to be scanned.How the lower boundary key of the range is to be interpreted by the scan.byte[]
Returns the lower boundary of the range to be scanned.
-
Constructor Details
-
KeyRange
public KeyRange(@Nonnull byte[] lowKey, @Nonnull EndpointType lowEndpoint, @Nonnull byte[] highKey, @Nonnull EndpointType highEndpoint) Creates a key range.- Parameters:
lowKey
- the starting key in the range. Note that a direct reference to this key is retained, so care must be taken not to modify its contentslowEndpoint
- how the low endpoint is to be treatedhighKey
- the ending key in the range. Note that a direct reference to this key is retained, so care must be taken not to modify its contentshighEndpoint
- how the high endpoint is to be treated
-
KeyRange
public KeyRange(@Nonnull byte[] lowKey, @Nonnull byte[] highKey) Creates a key range.- Parameters:
lowKey
- the starting key of the range, inclusivehighKey
- the ending key of the range, exclusive
-
-
Method Details
-
getLowKey
@Nonnull public byte[] getLowKey()Returns the lower boundary of the range to be scanned. How this starting key is to be interpreted in relation to a scan (e.g., inclusive or exclusive) is determined by the low endpoint value (getLowEndpoint()
. The value returned by this method should be treated as immutable and must not be modified by the caller.- Returns:
- the low key of the range to be scanned
-
getLowEndpoint
How the lower boundary key of the range is to be interpreted by the scan. For example, this can be inclusive or exclusive.- Returns:
- how the lower boundary key of the range is to be interpreted by the scan
- See Also:
-
getHighKey
@Nonnull public byte[] getHighKey()Returns the upper boundary of the range to be scanned. How this key is to be interpreted in relation to a scan (e.g., inclusive or exclusive) is determined by the high endpoint value (getHighEndpoint()
. The value returned by this method should be treated as immutable and must not be modified by the caller.- Returns:
- the high key of the range to be scanned
-
getHighEndpoint
How the upper boundary key of the range is to be interpreted by the scan. For example, this can be inclusive or exclusive.- Returns:
- how the upper boundary key of the range is to be interpreted by the scan
- See Also:
-