Public Member Functions | |
String | toString () |
Package Functions | |
KeyRange (Comparator comparator) | |
KeyRange | subRange (DatabaseEntry key) throws KeyRangeException |
KeyRange | subRange (DatabaseEntry beginKey, boolean beginInclusive, DatabaseEntry endKey, boolean endInclusive) throws KeyRangeException |
final DatabaseEntry | getSingleKey () |
final boolean | hasBound () |
boolean | check (DatabaseEntry key) |
boolean | check (DatabaseEntry key, boolean inclusive) |
boolean | checkBegin (DatabaseEntry key, boolean inclusive) |
boolean | checkEnd (DatabaseEntry key, boolean inclusive) |
int | compare (DatabaseEntry key1, DatabaseEntry key2) |
Static Package Functions | |
static int | compareBytes (byte[] data1, int offset1, int size1, byte[] data2, int offset2, int size2) |
static DatabaseEntry | copy (DatabaseEntry from) |
static void | copy (DatabaseEntry from, DatabaseEntry to) |
static byte[] | getByteArray (DatabaseEntry entry) |
static boolean | equalBytes (DatabaseEntry e1, DatabaseEntry e2) |
static String | toString (DatabaseEntry dbt) |
Definition at line 19 of file KeyRange.java.
|
Creates an unconstrained key range. Definition at line 31 of file KeyRange.java. Referenced by subRange(). |
|
Returns whether a given key is within range. Definition at line 123 of file KeyRange.java. References checkBegin(), checkEnd(), and compare(). |
|
Returns whether a given key is within range. Definition at line 111 of file KeyRange.java. References checkBegin(), checkEnd(), and compare(). Referenced by com::sleepycat::collections::DataView::append(), and subRange(). |
|
Returns whether the given key is within range with respect to the beginning of the range. The inclusive parameter should be true for checking a key read from the database; this will require that the key is within range. When inclusive=false the key is allowed to be equal to the beginKey for the range; this is used for checking a new exclusive bound of a sub-range. Note that when inclusive=false and beginInclusive=true our check is not exactly correct because in theory we should allow the key to be "one less" than the existing bound; however, checking for "one less" is impossible so we do the best we can and test the bounds conservatively. Definition at line 148 of file KeyRange.java. References compare(). Referenced by check(). |
|
Returns whether the given key is within range with respect to the end of the range. See checkBegin for details. Definition at line 163 of file KeyRange.java. References compare(). Referenced by check(). |
|
Compares two keys, using the user comparator if there is one. Definition at line 177 of file KeyRange.java. References compareBytes(), and getByteArray(). Referenced by check(), checkBegin(), and checkEnd(). |
|
Compares two keys as unsigned byte arrays, which is the default comparison used by JE/DB. Definition at line 193 of file KeyRange.java. Referenced by compare(). |
|
Copies one entry to another. Definition at line 224 of file KeyRange.java. References getByteArray(). |
|
Returns a copy of an entry. Definition at line 217 of file KeyRange.java. References getByteArray(). |
|
Returns the two DatabaseEntry objects have the same data value. Definition at line 246 of file KeyRange.java. |
|
Returns an entry's byte array, copying it if the entry offset is non-zero. Definition at line 233 of file KeyRange.java. |
|
Returns the key of a single-key range, or null if not a single-key range. Definition at line 85 of file KeyRange.java. Referenced by com::sleepycat::collections::DataView::getSingleKeyThang(). |
|
Returns whether this range has a begin or end bound. Definition at line 93 of file KeyRange.java. |
|
Creates a range that is the intersection of this range and the given range parameters. Definition at line 57 of file KeyRange.java. References beginInclusive, beginKey, check(), endInclusive, endKey, and KeyRange(). |
|
Creates a range for a single key. Definition at line 38 of file KeyRange.java. References beginInclusive, beginKey, check(), endInclusive, endKey, KeyRange(), and singleKey. Referenced by com::sleepycat::collections::DataView::subRange(). |
|
Converts the byte array of this thang to space-separated integers, and suffixed by the record number if applicable.
Definition at line 287 of file KeyRange.java. |
|
Formats this range as a string for debugging. Definition at line 101 of file KeyRange.java. |