/** * {@inheritDoc} */ @Override public LockResult findNearby(byte[] key) throws IOException { return source.findNearby(key); }
/** * {@inheritDoc} */ @Override public LockResult findNearby(byte[] key) throws IOException { return source.findNearby(key); }
/** * {@inheritDoc} */ @Override public LockResult findNearby(byte[] key) throws IOException { return source.findNearby(key); }
@Override public LockResult findNearby(byte[] key) throws IOException { return mSource.findNearby(key); }
@Override public LockResult findNearby(byte[] key) throws IOException { return mSource.findNearby(key); }
@Override public LockResult findNearby(byte[] key) throws IOException { return mSource.findNearby(key); }
@Override public LockResult findNearby(byte[] key) throws IOException { mKey = null; return mSource.findNearby(mView.applyPrefix(key)); }
@Override public LockResult findNearby(byte[] key) throws IOException { mKey = null; return mSource.findNearby(mView.applyPrefix(key)); }
private void alignKeys(byte[] key) throws IOException { if (mCompare != 0) { if (!Arrays.equals(key, mFirst.key())) { mFirst.findNearby(key); } if (!Arrays.equals(key, mSecond.key())) { mSecond.findNearby(key); } mCompare = 0; } }
@Override public LockResult findNearby(byte[] key) throws IOException { mKey = null; return mSource.findNearby(mView.applyPrefix(key)); }
@Override public LockResult findNearby(byte[] key) throws IOException { if (mView.inRange(key)) { return mSource.findNearby(key); } reset(); return LockResult.UNOWNED; }
@Override public LockResult findNearby(byte[] key) throws IOException { if (mView.inRange(key)) { return mSource.findNearby(key); } reset(); return LockResult.UNOWNED; }
@Override public LockResult findNearby(byte[] key) throws IOException { if (mView.inRange(key)) { LockResult result = mSource.findNearby(key); mOutOfBounds = false; return result; } else { mOutOfBounds = true; ViewUtils.findNearbyNoLock(mSource, key); return LockResult.UNOWNED; } }
@Override public LockResult findNearby(final byte[] tkey) throws IOException { final byte[] key = inverseTransformKey(tkey); if (key == null) { reset(); return LockResult.UNOWNED; } mKey = tkey; mValue = NOT_LOADED; return transformCurrent(mSource.findNearby(key), key, tkey); }
@Override public LockResult findNearby(final byte[] tkey) throws IOException { final byte[] key = inverseTransformKey(tkey); if (key == null) { reset(); return LockResult.UNOWNED; } mKey = tkey; mValue = NOT_LOADED; return transformCurrent(mSource.findNearby(key), key, tkey); }
@Override public LockResult findNearby(final byte[] tkey) throws IOException { mKey = tkey; final byte[] key = inverseTransformKey(tkey); if (key == null) { mValue = null; mSource.reset(); return LockResult.UNOWNED; } mValue = NOT_LOADED; return transformCurrent(mSource.findNearby(key), tkey); }
static void findNearbyNoLock(Cursor c, byte[] key) throws IOException { final boolean auto = c.autoload(false); final Transaction txn = c.link(Transaction.BOGUS); try { c.findNearby(key); } finally { c.link(txn); c.autoload(auto); } }
private void addEntriesBelow(final List<Entry<Long, Object>> resultList, final Cursor cursor, final SearchMetadataAroundTimestampState state, final int toAdd) throws IOException { int added = 0; cursor.findNearby(state.getLowestKey()); while (added < toAdd) { cursor.previous(); if (cursor.key() == null) { // no more entries in this direction break; } resultList.add(this.entryAt(cursor)); state.setLowestKey(cursor.key()); added++; state.setAddedLower(added); } }
private void addEntriesAbove(final List<Entry<Long, Object>> resultList, final Cursor cursor, final SearchMetadataAroundTimestampState state, final int toAdd) throws IOException { int added = 0; cursor.findNearby(state.getHighestKey()); while (added < toAdd) { cursor.next(); if (cursor.key() == null) { // no more entries in this direction break; } resultList.add(this.entryAt(cursor)); state.setHighestKey(cursor.key()); added++; state.setAddedUpper(added); } }
private void addEntriesAbove(final List<Entry<Long, Object>> resultList, final Cursor cursor, final SearchMetadataAroundTimestampState state, final int toAdd) throws IOException { int added = 0; cursor.findNearby(state.getHighestKey()); while (added < toAdd) { cursor.next(); if (cursor.key() == null) { // no more entries in this direction break; } resultList.add(this.entryAt(cursor)); state.setHighestKey(cursor.key()); added++; state.setAddedUpper(added); } }