/** * Compare an entry with a RawComparable object. This is useful when * Entries are stored in a collection, and we want to compare a user * supplied key. */ @Override public int compareTo(RawComparable key) { return reader.compareKeys(keyBuffer, 0, getKeyLength(), key.buffer(), key.offset(), key.size()); }
/** * Internal API. Comparing the key at cursor to user-specified key. * * @param other * user-specified key. * @return negative if key at cursor is smaller than user key; 0 if equal; * and positive if key at cursor greater than user key. * @throws IOException */ int compareCursorKeyTo(RawComparable other) throws IOException { checkKey(); return reader.compareKeys(keyBuffer, 0, klen, other.buffer(), other .offset(), other.size()); }
private int keyPrefixToInt(RawComparable key) throws IOException { byte[] b = key.buffer(); int o = key.offset(); return (b[o] & 0xff) << 24 | (b[o + 1] & 0xff) << 16 | (b[o + 2] & 0xff) << 8 | (b[o + 3] & 0xff); }
private int keyPrefixToInt(RawComparable key) throws IOException { byte[] b = key.buffer(); int o = key.offset(); return (b[o] & 0xff) << 24 | (b[o + 1] & 0xff) << 16 | (b[o + 2] & 0xff) << 8 | (b[o + 3] & 0xff); }
private int keyPrefixToInt(RawComparable key) throws IOException { byte[] b = key.buffer(); int o = key.offset(); return (b[o] & 0xff) << 24 | (b[o + 1] & 0xff) << 16 | (b[o + 2] & 0xff) << 8 | (b[o + 3] & 0xff); }
/** * Compare an entry with a RawComparable object. This is useful when * Entries are stored in a collection, and we want to compare a user * supplied key. */ @Override public int compareTo(RawComparable key) { return reader.compareKeys(keyBuffer, 0, getKeyLength(), key.buffer(), key.offset(), key.size()); }
/** * Compare an entry with a RawComparable object. This is useful when * Entries are stored in a collection, and we want to compare a user * supplied key. */ @Override public int compareTo(RawComparable key) { return reader.compareKeys(keyBuffer, 0, getKeyLength(), key.buffer(), key.offset(), key.size()); }
/** * Compare an entry with a RawComparable object. This is useful when * Entries are stored in a collection, and we want to compare a user * supplied key. */ @Override public int compareTo(RawComparable key) { return reader.compareKeys(keyBuffer, 0, getKeyLength(), key.buffer(), key.offset(), key.size()); }
/** * Compare an entry with a RawComparable object. This is useful when * Entries are stored in a collection, and we want to compare a user * supplied key. */ @Override public int compareTo(RawComparable key) { return reader.compareKeys(keyBuffer, 0, getKeyLength(), key.buffer(), key.offset(), key.size()); }
/** * Compare an entry with a RawComparable object. This is useful when * Entries are stored in a collection, and we want to compare a user * supplied key. */ @Override public int compareTo(RawComparable key) { return reader.compareKeys(keyBuffer, 0, getKeyLength(), key.buffer(), key.offset(), key.size()); }
/** * Internal API. Comparing the key at cursor to user-specified key. * * @param other * user-specified key. * @return negative if key at cursor is smaller than user key; 0 if equal; * and positive if key at cursor greater than user key. * @throws IOException */ int compareCursorKeyTo(RawComparable other) throws IOException { checkKey(); return reader.compareKeys(keyBuffer, 0, klen, other.buffer(), other .offset(), other.size()); }
/** * Internal API. Comparing the key at cursor to user-specified key. * * @param other * user-specified key. * @return negative if key at cursor is smaller than user key; 0 if equal; * and positive if key at cursor greater than user key. * @throws IOException */ int compareCursorKeyTo(RawComparable other) throws IOException { checkKey(); return reader.compareKeys(keyBuffer, 0, klen, other.buffer(), other .offset(), other.size()); }
/** * Internal API. Comparing the key at cursor to user-specified key. * * @param other * user-specified key. * @return negative if key at cursor is smaller than user key; 0 if equal; * and positive if key at cursor greater than user key. * @throws IOException */ int compareCursorKeyTo(RawComparable other) throws IOException { checkKey(); return reader.compareKeys(keyBuffer, 0, klen, other.buffer(), other .offset(), other.size()); }
/** * Compare an entry with a RawComparable object. This is useful when * Entries are stored in a collection, and we want to compare a user * supplied key. */ @Override public int compareTo(RawComparable key) { return reader.compareKeys(blockBuffer, getKeyOffset(), getKeyLength(), key.buffer(), key.offset(), key.size()); }