/** * Get a scanner that covers a specific key range. * * @param beginKey * Begin key of the scan (inclusive). If null, scan from the first * key-value entry of the TFile. * @param endKey * End key of the scan (exclusive). If null, scan up to the last * key-value entry of the TFile. * @return The actual coverage of the returned scanner will cover all keys * greater than or equal to the beginKey and less than the endKey. * @throws IOException */ public Scanner createScannerByKey(RawComparable beginKey, RawComparable endKey) throws IOException { if ((beginKey != null) && (endKey != null) && (compareKeys(beginKey, endKey) >= 0)) { return new Scanner(this, beginKey, beginKey); } return new Scanner(this, beginKey, endKey); }
/** * Get a scanner that covers a specific key range. * * @param beginKey * Begin key of the scan (inclusive). If null, scan from the first * key-value entry of the TFile. * @param endKey * End key of the scan (exclusive). If null, scan up to the last * key-value entry of the TFile. * @return The actual coverage of the returned scanner will cover all keys * greater than or equal to the beginKey and less than the endKey. * @throws IOException */ public Scanner createScannerByKey(RawComparable beginKey, RawComparable endKey) throws IOException { if ((beginKey != null) && (endKey != null) && (compareKeys(beginKey, endKey) >= 0)) { return new Scanner(this, beginKey, beginKey); } return new Scanner(this, beginKey, endKey); }
/** * Get a scanner that covers a specific key range. * * @param beginKey * Begin key of the scan (inclusive). If null, scan from the first * key-value entry of the TFile. * @param endKey * End key of the scan (exclusive). If null, scan up to the last * key-value entry of the TFile. * @return The actual coverage of the returned scanner will cover all keys * greater than or equal to the beginKey and less than the endKey. * @throws IOException */ public Scanner createScannerByKey(RawComparable beginKey, RawComparable endKey) throws IOException { if ((beginKey != null) && (endKey != null) && (compareKeys(beginKey, endKey) >= 0)) { return new Scanner(this, beginKey, beginKey); } return new Scanner(this, beginKey, endKey); }
/** * Get a scanner that covers a specific key range. * * @param beginKey * Begin key of the scan (inclusive). If null, scan from the first * key-value entry of the TFile. * @param endKey * End key of the scan (exclusive). If null, scan up to the last * key-value entry of the TFile. * @return The actual coverage of the returned scanner will cover all keys * greater than or equal to the beginKey and less than the endKey. * @throws IOException */ public Scanner createScannerByKey(RawComparable beginKey, RawComparable endKey) throws IOException { if ((beginKey != null) && (endKey != null) && (compareKeys(beginKey, endKey) >= 0)) { return new Scanner(this, beginKey, beginKey); } return new Scanner(this, beginKey, endKey); }
/** * Get a scanner that covers a specific key range. * * @param beginKey * Begin key of the scan (inclusive). If null, scan from the first * key-value entry of the TFile. * @param endKey * End key of the scan (exclusive). If null, scan up to the last * key-value entry of the TFile. * @return The actual coverage of the returned scanner will cover all keys * greater than or equal to the beginKey and less than the endKey. * @throws IOException */ public Scanner createScannerByKey(RawComparable beginKey, RawComparable endKey) throws IOException { if ((beginKey != null) && (endKey != null) && (compareKeys(beginKey, endKey) >= 0)) { return new Scanner(this, beginKey, beginKey); } return new Scanner(this, beginKey, endKey); }
/** * 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()); }
/** * 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(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()); }
/** * Get a scanner that covers a specific key range. * * @param beginKey * Begin key of the scan (inclusive). If null, scan from the first * key-value entry of the TFile. * @param endKey * End key of the scan (exclusive). If null, scan up to the last * key-value entry of the TFile. * @return The actual coverage of the returned scanner will cover all keys * greater than or equal to the beginKey and less than the endKey. * @throws IOException */ public Scanner createScannerByKey(RawComparable beginKey, RawComparable endKey) throws IOException { if ((beginKey != null) && (endKey != null) && (compareKeys(beginKey, endKey) >= 0)) { return new Scanner(this, beginKey, beginKey); } return new Scanner(this, beginKey, endKey); }
/** * 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(keyBuffer, 0, getKeyLength(), key.buffer(), key.offset(), key.size()); }