Package com.apple.foundationdb
Class Range
java.lang.Object
com.apple.foundationdb.Range
A simple description of an exact range of keyspace, specified by a begin and end key. As with
all FoundationDB APIs,
begin
is inclusive, end
exclusive.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRange
(byte[] begin, byte[] end) Construct a newRange
with an inclusive begin key and an exclusive end key. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if the givenObject
is aRange
object that refers to the same key range within the keyspace.int
hashCode()
static Range
startsWith
(byte[] prefix) Returns aRange
that describes all possible keys that are prefixed with a specified key.toString()
Returns a human-readableString
representation of thisRange
.
-
Field Details
-
begin
public final byte[] beginThe beginning of the range. This constraint on the range is inclusive. -
end
public final byte[] endThe end of the range. This constraint on the range is exclusive.
-
-
Constructor Details
-
Range
public Range(byte[] begin, byte[] end) Construct a newRange
with an inclusive begin key and an exclusive end key.- Parameters:
begin
- the inclusive beginning of the range.end
- the exclusive end of the range.
-
-
Method Details
-
startsWith
Returns aRange
that describes all possible keys that are prefixed with a specified key. Use the result of this call as an input toReadTransaction.getRange(Range)
to replicate the now-removed callTransaction.getRangeStartsWith(k)
.- Parameters:
prefix
- the key prefixing the range, must not benull
- Returns:
- the range of keys starting with
prefix
-
equals
-
hashCode
public int hashCode() -
toString
-