/** * {@inheritDoc} */ @Override public LockResult findGt(byte[] key) throws IOException { return source.findGt(key); }
/** * {@inheritDoc} */ @Override public LockResult findGt(byte[] key) throws IOException { return source.findGt(key); }
@Override public LockResult findLt(byte[] key) throws IOException { return mSource.findGt(key); }
/** * {@inheritDoc} */ @Override public LockResult findGt(byte[] key) throws IOException { return source.findGt(key); }
@Override public LockResult findLt(byte[] key) throws IOException { return mSource.findGt(key); }
@Override public LockResult findLt(byte[] key) throws IOException { return mSource.findGt(key); }
@Override public LockResult findGt(byte[] key) throws IOException { mKey = null; return mSource.findGt(mView.applyPrefix(key)); }
@Override public LockResult findGt(byte[] key) throws IOException { mKey = null; return mSource.findGt(mView.applyPrefix(key)); }
@Override public LockResult findGt(byte[] key) throws IOException { mKey = null; return mSource.findGt(mView.applyPrefix(key)); }
private LockResult toFirst() throws IOException { BoundedView view = mView; byte[] start = view.mStart; Cursor source = mSource; if (start == null) { return source.first(); } else if ((view.mMode & START_EXCLUSIVE) == 0) { return source.findGe(start); } else { return source.findGt(start); } }
private LockResult toFirst() throws IOException { BoundedView view = mView; byte[] start = view.mStart; Cursor source = mSource; if (start == null) { return source.first(); } else if ((view.mMode & START_EXCLUSIVE) == 0) { return source.findGe(start); } else { return source.findGt(start); } }
private LockResult toFirst() throws IOException { LockResult result; BoundedView view = mView; byte[] start = view.mStart; Cursor source = mSource; if (start == null) { result = source.first(); } else if ((view.mMode & START_EXCLUSIVE) == 0) { result = source.findGe(start); } else { result = source.findGt(start); } mOutOfBounds = false; return result; }
cursor.findGt(TuplUtils.encodeLong(timestamp)); if (cursor.key() == null) {
@Override public LockResult findGt(byte[] key) throws IOException { BoundedView view = mView; if (view.startRangeCompare(key) < 0) { return first(); } final Cursor source = mSource; if (view.mEnd == null) { return source.findGt(key); } final Transaction txn = source.link(Transaction.BOGUS); final boolean autoload = source.autoload(false); try { source.findGt(key); key = source.key(); if (key == null) { return LockResult.UNOWNED; } if (view.endRangeCompare(key) > 0) { source.reset(); return LockResult.UNOWNED; } } finally { autoload(autoload); link(txn); } // This performs any required lock acquisition. return source.load(); }
@Override public LockResult findGt(byte[] key) throws IOException { BoundedView view = mView; if (view.startRangeCompare(key) < 0) { return first(); } final Cursor source = mSource; if (view.mEnd == null) { return source.findGt(key); } final Transaction txn = source.link(Transaction.BOGUS); final boolean autoload = source.autoload(false); try { source.findGt(key); key = source.key(); if (key == null) { return LockResult.UNOWNED; } if (view.endRangeCompare(key) > 0) { source.reset(); return LockResult.UNOWNED; } } finally { autoload(autoload); link(txn); } // This performs any required lock acquisition. return source.load(); }
@Override public LockResult findGt(final byte[] tkey) throws IOException { final Cursor c = mSource; LockResult result; try { byte[] key = inverseTransformKey(tkey); if (key == null) { key = mTransformer.inverseTransformKeyGt(tkey); if (key == null) { reset(); return LockResult.UNOWNED; } result = c.findGe(key); } else { result = c.findGt(key); } } catch (LockFailureException e) { throw transformCurrent(e); } result = transformCurrent(result); return result == null ? next() : result; }
@Override public LockResult findGt(final byte[] tkey) throws IOException { final Cursor c = mSource; LockResult result; try { byte[] key = inverseTransformKey(tkey); if (key == null) { key = mTransformer.inverseTransformKeyGt(tkey); if (key == null) { reset(); return LockResult.UNOWNED; } result = c.findGe(key); } else { result = c.findGt(key); } } catch (LockFailureException e) { throw transformCurrent(e); } result = transformCurrent(result); return result == null ? next() : result; }
@Override public LockResult findGt(final byte[] tkey) throws IOException { final Cursor c = mSource; LockResult result; try { byte[] key = inverseTransformKey(tkey); if (key == null) { key = mTransformer.inverseTransformKeyGt(tkey); if (key == null) { reset(); return LockResult.UNOWNED; } result = c.findGe(key); } else { result = c.findGt(key); } } catch (LockFailureException e) { throw transformCurrent(e); } result = transformCurrent(result); return result == null ? next() : result; }
switch (mode) { case GREATER_THAN: cursor.findGt(searchKey); break; case GREATER_EQUAL: