/** * {@inheritDoc} */ @Override public LockResult previous() throws IOException { return source.previous(); }
@Override public LockResult previous() throws IOException { BoundedView view = mView; byte[] start = view.mStart; Cursor source = mSource; if (start == null) { return source.previous(); } else if ((view.mMode & START_EXCLUSIVE) == 0) { return source.previousGe(start); } else { return source.previousGt(start); } }
/** * {@inheritDoc} */ @Override public LockResult previous() throws IOException { return source.previous(); }
@Override public LockResult previous() throws IOException { BoundedView view = mView; byte[] start = view.mStart; Cursor source = mSource; if (start == null) { return source.previous(); } else if ((view.mMode & START_EXCLUSIVE) == 0) { return source.previousGe(start); } else { return source.previousGt(start); } }
/** * {@inheritDoc} */ @Override public LockResult previous() throws IOException { return source.previous(); }
@Override public LockResult previous() throws IOException { LockResult result; BoundedView view = mView; byte[] start = view.mStart; Cursor source = mSource; if (start == null) { result = source.previous(); } else if ((view.mMode & START_EXCLUSIVE) == 0) { result = source.previousGe(start); } else { result = source.previousGt(start); } mOutOfBounds = false; return result; }
@Override public LockResult previous() throws IOException { mKey = null; return mSource.previous(); }
@Override public LockResult previous() throws IOException { mKey = null; return mSource.previous(); }
@Override public LockResult previous() throws IOException { mKey = null; return mSource.previous(); }
@Override public LockResult next() throws IOException { return mSource.previous(); }
@Override public LockResult next() throws IOException { return mSource.previous(); }
@Override public LockResult next() throws IOException { return mSource.previous(); }
/** * Moves the Cursor to find the first available entry less than the given * key. * * <p>Ownership of the key instance transfers to the Cursor, and it must * not be modified after calling this method. * * @return {@link LockResult#UNOWNED UNOWNED}, {@link LockResult#ACQUIRED * ACQUIRED}, {@link LockResult#OWNED_SHARED OWNED_SHARED}, {@link * LockResult#OWNED_UPGRADABLE OWNED_UPGRADABLE}, or {@link * LockResult#OWNED_EXCLUSIVE OWNED_EXCLUSIVE} * @throws NullPointerException if key is null */ public default LockResult findLt(byte[] key) throws IOException { ViewUtils.findNoLock(this, key); return previous(); }
private static void moveCursor(final Cursor cursor, final Order order) throws IOException { switch (order) { case ASCENDING: cursor.next(); break; case DESCENDING: cursor.previous(); break; default: throw new UnknownEnumLiteralException(order); } }
private static void moveCursor(final Cursor cursor, final Order order) throws IOException { switch (order) { case ASCENDING: cursor.next(); break; case DESCENDING: cursor.previous(); break; default: throw new UnknownEnumLiteralException(order); } }
@Override public LockResult previous() throws IOException { final Cursor c = mSource; while (true) { LockResult result; try { result = c.previous(); } catch (LockFailureException e) { throw transformCurrent(e); } result = transformCurrent(result); if (result != null) { return result; } } }
@Override public LockResult previous() throws IOException { final Cursor c = mSource; while (true) { LockResult result; try { result = c.previous(); } catch (LockFailureException e) { throw transformCurrent(e); } result = transformCurrent(result); if (result != null) { return result; } } }
@Override public LockResult previous() throws IOException { final Cursor c = mSource; while (true) { LockResult result; try { result = c.previous(); } catch (LockFailureException e) { throw transformCurrent(e); } result = transformCurrent(result); if (result != null) { return result; } } }
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 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); } }