@Override public long count(byte[] lowKey, byte[] highKey) throws IOException { return mSource.count(lowKey, highKey); }
@Override public boolean delete(Transaction txn, byte[] key) throws IOException { return mSource.delete(txn, key); }
@Override public byte[] exchange(Transaction txn, byte[] key, byte[] value) throws IOException { return mSource.exchange(txn, key, value); }
@Override public Cursor newCursor(Transaction txn) { return new TransformedCursor(mSource.newCursor(txn), mTransformer); }
/** * Returns a sub-view, backed by this one, whose keys are greater than the * given key. Ownership of the key instance is transferred, and so it must * not be modified after calling this method. * * <p>The returned view will throw a {@link ViewConstraintException} on an attempt to * insert a key outside its range. * * @throws UnsupportedOperationException if view is unordered * @throws NullPointerException if key is null */ public default View viewGt(byte[] key) { Ordering ordering = getOrdering(); if (ordering == Ordering.ASCENDING) { return BoundedView.viewGt(this, key); } else if (ordering == Ordering.DESCENDING) { return BoundedView.viewGt(viewReverse(), key).viewReverse(); } else { throw new UnsupportedOperationException("Unsupported ordering: " + ordering); } }
@Override public View viewReverse() { return new TrimmedView(mSource.viewReverse(), mPrefix, mTrim); }
@Override public final LockResult lockCheck(Transaction txn, byte[] key) throws ViewConstraintException { return mSource.lockCheck(txn, key); }
@Override public boolean insert(Transaction txn, byte[] key, byte[] value) throws IOException { return mSource.insert(txn, key, value); }
@Override public boolean isUnmodifiable() { return mSource.isUnmodifiable(); }
@Override public Ordering getOrdering() { return mSource.getOrdering(); }
@Override public byte[] load(Transaction txn, byte[] key) throws IOException { return mSource.load(txn, key); }
@Override public Cursor newCursor(Transaction txn) { return new UnmodifiableCursor(mSource.newCursor(txn)); }
/** * Returns a sub-view, backed by this one, whose keys are greater than or * equal to the given key. Ownership of the key instance is transferred, * and so it must not be modified after calling this method. * * <p>The returned view will throw a {@link ViewConstraintException} on an attempt to * insert a key outside its range. * * @throws UnsupportedOperationException if view is unordered * @throws NullPointerException if key is null */ public default View viewGe(byte[] key) { Ordering ordering = getOrdering(); if (ordering == Ordering.ASCENDING) { return BoundedView.viewGe(this, key); } else if (ordering == Ordering.DESCENDING) { return BoundedView.viewGe(viewReverse(), key).viewReverse(); } else { throw new UnsupportedOperationException("Unsupported ordering: " + ordering); } }
@Override public View viewReverse() { return apply(mSource.viewReverse()); }
@Override public boolean insert(Transaction txn, byte[] key, byte[] value) throws IOException { return mSource.insert(txn, key, value); }
@Override public boolean isUnmodifiable() { return mSource.isUnmodifiable(); }