/** * {@inheritDoc} */ @Override public byte[] value() { return source.value(); }
/** * {@inheritDoc} */ @Override public byte[] value() { return source.value(); }
@Override public byte[] value() { return mSource.value(); }
@Override public byte[] value() { return mSource.value(); }
/** * {@inheritDoc} */ @Override public byte[] value() { return source.value(); }
@Override public byte[] value() { return mSource.value(); }
@Override public byte[] value() { return mSource.value(); }
@Override public byte[] value() { return mSource.value(); }
@Override public byte[] value() { return mOutOfBounds ? null : mSource.value(); }
@Override public byte[] value() { return mSource.value(); }
@Override public byte[] value() { return mCursor.value(); }
@Override public byte[] value() { return mSource.value(); }
@Override public byte[] value() { return mSource.value(); }
@Override public byte[] value() { return KeyOnlyView.valueScrub(source.value()); }
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 LockResult selectPrevious(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.previous(); } if ((sn | !fn) && mSecond.key() != null) { mSecond.previous(); } } }
private Entry<Long, Object> entryAt(final Cursor cursor) throws IOException { if (cursor.autoload() == false) { cursor.load(); } long timestamp = TuplUtils.decodeLong(cursor.key()); byte[] data = cursor.value(); Object commitMetadata = this.deserialize(data); return Pair.of(timestamp, commitMetadata); }
private Entry<Long, Object> entryAt(final Cursor cursor) throws IOException { if (cursor.autoload() == false) { cursor.load(); } long timestamp = TuplUtils.decodeLong(cursor.key()); byte[] data = cursor.value(); Object commitMetadata = this.deserialize(data); return Pair.of(timestamp, commitMetadata); }
@Override public byte[] load(Transaction txn, byte[] key) throws IOException { Cursor c = mSource.newCursor(txn); try { c.autoload(false); c.find(key); return valueScrub(c.value()); } finally { c.reset(); } }
@Override public byte[] exchange(Transaction txn, byte[] key, byte[] value) throws IOException { valueCheck(value); Cursor c = mSource.newCursor(txn); try { c.autoload(false); c.find(key); byte[] old = valueScrub(c.value()); c.store(value); return old; } finally { c.reset(); } }