@Override public byte[] load(Transaction txn, byte[] key) throws IOException { return mSource.load(txn, key); }
@Override public byte[] load(Transaction txn, byte[] key) throws IOException { return mSource.load(txn, key); }
@Override public byte[] load(Transaction txn, byte[] key) throws IOException { return mSource.load(txn, key); }
@Override public byte[] load(Transaction txn, byte[] key) throws IOException { return mSource.load(txn, key); }
@Override public byte[] load(Transaction txn, byte[] key) throws IOException { return mSource.load(txn, key); }
@Override public byte[] load(Transaction txn, byte[] key) throws IOException { return mSource.load(txn, key); }
/** * If {@link #requireValues requireValues} always returns false, consider overriding this * method and implement a more efficient load for two views in a union. */ public default byte[] loadUnion(Transaction txn, byte[] key, View first, View second) throws IOException { byte[] v1 = first.load(txn, key); byte[] v2 = second.load(txn, key); return v1 == null ? v2 : (v2 == null ? v1 : combine(key, v1, v2)); }
@Override public byte[] loadUnion(Transaction txn, byte[] key, View first, View second) throws IOException { byte[] v1 = first.load(txn, key); if (v1 == null) { return second.load(txn, key); } else { // Always need to lock the second entry too, for consistency and to avoid any // odd deadlocks if the store method is called. second.touch(txn, key); return v1; } }
@Override public byte[] load(Transaction txn, byte[] key) throws IOException { return mSource.load(txn, applyPrefix(key)); }
@Override public byte[] load(Transaction txn, byte[] key) throws IOException { return inRange(key) ? mSource.load(txn, key) : null; }
@Override public byte[] load(Transaction txn, byte[] key) throws IOException { return inRange(key) ? mSource.load(txn, key) : null; }
@Override public byte[] load(Transaction txn, byte[] key) throws IOException { return mSource.load(txn, applyPrefix(key)); }
@Override public byte[] load(Transaction txn, byte[] key) throws IOException { return inRange(key) ? mSource.load(txn, key) : null; }
@Override public byte[] load(Transaction txn, byte[] key) throws IOException { return mSource.load(txn, applyPrefix(key)); }
@Override public byte[] loadDifference(Transaction txn, byte[] key, View first, View second) throws IOException { byte[] v1 = first.load(txn, key); if (v1 == null) { // Always need to lock the second entry too, for consistency and to avoid any odd // deadlocks if the store method is called. second.touch(txn, key); return null; } return v1; } };
@Override public byte[] loadIntersection(Transaction txn, byte[] key, View first, View second) throws IOException { // Lock the first, for consistency. first.touch(txn, key); byte[] v2 = second.load(txn, key); return v2 == null ? null : first.exists(txn, key) ? v2 : null; } };
@Override public byte[] loadIntersection(Transaction txn, byte[] key, View first, View second) throws IOException { byte[] v1 = first.load(txn, key); if (v1 == null) { // Always need to lock the second entry too, for consistency and to avoid any odd // deadlocks if the store method is called. second.touch(txn, key); return null; } return second.exists(txn, key) ? v1 : null; }
@Override public byte[] loadDifference(Transaction txn, byte[] key, View first, View second) throws IOException { byte[] v1 = first.load(txn, key); if (v1 == null) { // Always need to lock the second entry too, for consistency and to avoid any odd // deadlocks if the store method is called. second.touch(txn, key); return null; } return second.exists(txn, key) ? null : v1; } };