Package com.apple.foundationdb.record
Class KeyRange
- java.lang.Object
-
- com.apple.foundationdb.record.KeyRange
-
@API(MAINTAINED) public class KeyRange extends Object
A range within a subspace specified by two byte value endpoints.
-
-
Constructor Summary
Constructors Constructor Description KeyRange(byte[] lowKey, byte[] highKey)
Creates a key range.KeyRange(byte[] lowKey, EndpointType lowEndpoint, byte[] highKey, EndpointType highEndpoint)
Creates a key range.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EndpointType
getHighEndpoint()
byte[]
getHighKey()
Returns the upper boundary of the range to be scanned.EndpointType
getLowEndpoint()
byte[]
getLowKey()
Returns the lower boundary of the range to be scanned.
-
-
-
Constructor Detail
-
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
-
-
Method Detail
-
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
@Nonnull public EndpointType getLowEndpoint()
- Returns:
- how the lower boundary key of the range is to be interpreted by the scan (e.g. inclusive or exclusive)
-
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
@Nonnull public EndpointType getHighEndpoint()
- Returns:
- how the upper boundary key of the range is to be interpreted by the scan (e.g. inclusive or exclusive)
-
-