@Override public boolean replace(Transaction txn, byte[] key, byte[] value) throws IOException { return mSource.replace(txn, key, value); }
@Override public boolean replace(Transaction txn, byte[] key, byte[] value) throws IOException { return mSource.replace(txn, key, value); }
@Override public boolean replace(Transaction txn, byte[] key, byte[] value) throws IOException { return mSource.replace(txn, key, value); }
/** * Unconditionally removes the entry associated with the given key. Equivalent to: * {@link #replace replace(txn, key, null)} * * <p>If the entry must be locked, ownership of the key instance is transferred. The key * must not be modified after calling this method. * * @param txn optional transaction; pass null for auto-commit mode * @param key non-null key * @return false if no existing entry * @throws NullPointerException if key is null * @throws IllegalArgumentException if transaction belongs to another database instance * @throws ViewConstraintException if remove is not permitted */ public default boolean delete(Transaction txn, byte[] key) throws IOException { return replace(txn, key, null); }
/** * Unconditionally removes the entry associated with the given key. Equivalent to: * <code>replace(txn, key, null)</code> * * <p>If the entry must be locked, ownership of the key instance is transferred. The key * must not be modified after calling this method. * * @param txn optional transaction; pass null for auto-commit mode * @param key non-null key * @return false if no existing entry * @throws NullPointerException if key is null * @throws IllegalArgumentException if transaction belongs to another database instance * @throws ViewConstraintException if remove is not permitted */ public default boolean delete(Transaction txn, byte[] key) throws IOException { return replace(txn, key, null); }
/** * Unconditionally removes the entry associated with the given key. Equivalent to: * <code>replace(txn, key, null)</code> * * <p>If the entry must be locked, ownership of the key instance is transferred. The key * must not be modified after calling this method. * * @param txn optional transaction; pass null for auto-commit mode * @param key non-null key * @return false if no existing entry * @throws NullPointerException if key is null * @throws IllegalArgumentException if transaction belongs to another database instance * @throws ViewConstraintException if remove is not permitted */ public default boolean delete(Transaction txn, byte[] key) throws IOException { return replace(txn, key, null); }
@Override public boolean replace(Transaction txn, byte[] key, byte[] value) throws IOException { valueCheck(value); return mSource.replace(txn, key, null); }
@Override public boolean replace(Transaction txn, byte[] key, byte[] value) throws IOException { return mSource.replace(txn, applyPrefix(key), value); }
@Override public boolean replace(Transaction txn, byte[] key, byte[] value) throws IOException { return inRange(key) ? mSource.replace(txn, key, value) : false; }
@Override public boolean replace(Transaction txn, byte[] key, byte[] value) throws IOException { return mSource.replace(txn, applyPrefix(key), value); }
@Override public boolean replace(Transaction txn, byte[] key, byte[] value) throws IOException { return mSource.replace(txn, applyPrefix(key), value); }
@Override public boolean replace(Transaction txn, byte[] key, byte[] value) throws IOException { return inRange(key) ? mSource.replace(txn, key, value) : false; }
@Override public boolean replace(Transaction txn, byte[] key, byte[] value) throws IOException { return inRange(key) ? mSource.replace(txn, key, value) : false; }
@Override public boolean replace(final Transaction txn, final byte[] tkey, final byte[] tvalue) throws IOException { final byte[] key = inverseTransformKey(tkey); if (key == null) { return false; } final byte[] value = mTransformer.inverseTransformValue(tvalue, key, tkey); if (txn == null || txn.lockMode() == LockMode.UNSAFE) { return mSource.replace(txn, key, value); } return condStore(txn, key, value, null); }
@Override public boolean replace(final Transaction txn, final byte[] tkey, final byte[] tvalue) throws IOException { final byte[] key = inverseTransformKey(tkey); if (key == null) { return false; } final byte[] value = mTransformer.inverseTransformValue(tvalue, key, tkey); if (txn == null || txn.lockMode() == LockMode.UNSAFE) { return mSource.replace(txn, key, value); } return condStore(txn, key, value, null); }
@Override public boolean replace(final Transaction txn, final byte[] tkey, final byte[] tvalue) throws IOException { final byte[] key = inverseTransformKey(tkey); if (key == null) { return false; } final byte[] value = mTransformer.inverseTransformValue(tvalue, key, tkey); if (value == null) { return mSource.delete(txn, key); } else if (tvalue != null) { return mSource.replace(txn, key, value); } else { return mSource.update(txn, key, value); } }