/** * {@inheritDoc} */ @Override public LockResult next() throws IOException { return source.next(); }
@Override public LockResult next() throws IOException { BoundedView view = mView; byte[] end = view.mEnd; Cursor source = mSource; if (end == null) { return source.next(); } else if ((view.mMode & END_EXCLUSIVE) == 0) { return source.nextLe(end); } else { return source.nextLt(end); } }
/** * {@inheritDoc} */ @Override public LockResult next() throws IOException { return source.next(); }
@Override public LockResult next() throws IOException { BoundedView view = mView; byte[] end = view.mEnd; Cursor source = mSource; if (end == null) { return source.next(); } else if ((view.mMode & END_EXCLUSIVE) == 0) { return source.nextLe(end); } else { return source.nextLt(end); } }
/** * {@inheritDoc} */ @Override public LockResult next() throws IOException { return source.next(); }
@Override public LockResult next() throws IOException { LockResult result; BoundedView view = mView; byte[] end = view.mEnd; Cursor source = mSource; if (end == null) { result = source.next(); } else if ((view.mMode & END_EXCLUSIVE) == 0) { result = source.nextLe(end); } else { result = source.nextLt(end); } mOutOfBounds = false; return result; }
@Override public LockResult previous() throws IOException { return mSource.next(); }
@Override public LockResult next() throws IOException { mKey = null; return mSource.next(); }
@Override public LockResult next() throws IOException { mKey = null; return mSource.next(); }
@Override public LockResult next() throws IOException { mKey = null; return mSource.next(); }
@Override public LockResult previous() throws IOException { return mSource.next(); }
@Override public LockResult previous() throws IOException { return mSource.next(); }
@Override public boolean step() throws IOException { Cursor c = mCursor; try { c.next(); return c.key() != null; } catch (UnpositionedCursorException e) { return false; } catch (Throwable e) { throw ViewUtils.fail(this, e); } }
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 next() throws IOException { final Cursor c = mSource; while (true) { LockResult result; try { result = c.next(); } catch (LockFailureException e) { throw transformCurrent(e); } result = transformCurrent(result); if (result != null) { return result; } } }
@Override public LockResult next() throws IOException { final Cursor c = mSource; while (true) { LockResult result; try { result = c.next(); } catch (LockFailureException e) { throw transformCurrent(e); } result = transformCurrent(result); if (result != null) { return result; } } }
private LockResult selectNext(Transaction txn) throws IOException { while (true) { LockResult result = select(txn); if (result != null) { return result; } boolean fn = mFirst.value() == null; boolean sn = mSecond.value() == null; if ((fn | !sn) && mFirst.key() != null) { mFirst.next(); } if ((sn | !fn) && mSecond.key() != null) { mSecond.next(); } } }
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); } }