private LockResult doTouch(Transaction txn, byte[] key) throws LockFailureException { LockResult r1 = mFirst.touch(txn, key); LockResult r2; try { r2 = mSecond.touch(txn, key); } catch (Throwable e) { throw ViewUtils.lockCleanup(e, txn, r1); } return lockCombine(txn, r1, r2); }
@Override public LockResult lockExclusive(Transaction txn, byte[] key) throws LockFailureException, ViewConstraintException { LockResult r1 = mFirst.lockExclusive(txn, key); LockResult r2; try { r2 = mSecond.lockExclusive(txn, key); } catch (Throwable e) { throw ViewUtils.lockCleanup(e, txn, r1); } return lockCombine(txn, r1, r2); }
@Override public LockResult lockShared(Transaction txn, byte[] key) throws LockFailureException, ViewConstraintException { LockResult r1 = mFirst.lockShared(txn, key); LockResult r2; try { r2 = mSecond.lockShared(txn, key); } catch (Throwable e) { throw ViewUtils.lockCleanup(e, txn, r1); } return lockCombine(txn, r1, r2); }
@Override public LockResult lockUpgradable(Transaction txn, byte[] key) throws LockFailureException, ViewConstraintException { LockResult r1 = mFirst.lockUpgradable(txn, key); LockResult r2; try { r2 = mSecond.lockUpgradable(txn, key); } catch (Throwable e) { throw ViewUtils.lockCleanup(e, txn, r1); } return lockCombine(txn, r1, r2); }
throw ViewUtils.lockCleanup(e, txn, result);
throw ViewUtils.lockCleanup(e, txn, result);