mOpenTreesLatch.acquireExclusive(); try { TreeRef ref = mOpenTreesById.removeValue(tree.mId); if (ref == null || ref.get() != tree) {
mOpenTreesLatch.acquireExclusive(); try { _TreeRef ref = mOpenTreesById.removeValue(tree.mId); if (ref == null || ref.get() != tree) {
/** * Removes all references to a temporary tree which was grafted to another one. Caller must * hold shared commit lock. */ void removeGraftedTempTree(Tree tree) throws IOException { try { mOpenTreesLatch.acquireExclusive(); try { TreeRef ref = mOpenTreesById.removeValue(tree.mId); if (ref != null && ref.get() == tree) { ref.clear(); } } finally { mOpenTreesLatch.releaseExclusive(); } byte[] trashIdKey = newKey(KEY_TYPE_TRASH_ID, tree.mIdBytes); mRegistryKeyMap.delete(Transaction.BOGUS, trashIdKey); mRegistry.delete(Transaction.BOGUS, tree.mIdBytes); } catch (Throwable e) { throw closeOnFailure(this, e); } }
/** * Removes all references to a temporary tree which was grafted to another one. Caller must * hold shared commit lock. */ void removeGraftedTempTree(_Tree tree) throws IOException { try { mOpenTreesLatch.acquireExclusive(); try { _TreeRef ref = mOpenTreesById.removeValue(tree.mId); if (ref != null && ref.get() == tree) { ref.clear(); } } finally { mOpenTreesLatch.releaseExclusive(); } byte[] trashIdKey = newKey(KEY_TYPE_TRASH_ID, tree.mIdBytes); mRegistryKeyMap.delete(Transaction.BOGUS, trashIdKey); mRegistry.delete(Transaction.BOGUS, tree.mIdBytes); } catch (Throwable e) { throw closeOnFailure(this, e); } }
@Override public boolean txnCommitFinal(long txnId) throws IOException { checkHighest(txnId); _LocalTransaction txn = mTransactions.removeValue(txnId); if (txn != null) { txn.commitAll(); } return true; }
@Override public boolean txnRollbackFinal(long txnId) throws IOException { checkHighest(txnId); Transaction txn = mTransactions.removeValue(txnId); if (txn != null) { txn.reset(); } return true; }
@Override public boolean txnCommitFinal(long txnId) throws IOException { checkHighest(txnId); _LocalTransaction txn = mTransactions.removeValue(txnId); if (txn != null) { txn.commitAll(); } return true; }
@Override public boolean txnCommitFinal(long txnId) throws IOException { checkHighest(txnId); LocalTransaction txn = mTransactions.removeValue(txnId); if (txn != null) { txn.commitAll(); } return true; }
@Override public boolean txnRollbackFinal(long txnId) throws IOException { checkHighest(txnId); Transaction txn = mTransactions.removeValue(txnId); if (txn != null) { txn.reset(); } return true; }
@Override public boolean txnRollbackFinal(long txnId) throws IOException { checkHighest(txnId); Transaction txn = mTransactions.removeValue(txnId); if (txn != null) { txn.reset(); } return true; }
@Override public boolean txnCommitFinal(long txnId) throws IOException { checkHighest(txnId); LocalTransaction txn = mTransactions.removeValue(txnId); if (txn != null) { txn.commitAll(); } return true; }
@Override public boolean txnRollbackFinal(long txnId) throws IOException { checkHighest(txnId); Transaction txn = mTransactions.removeValue(txnId); if (txn != null) { txn.reset(); } return true; }
@Override public boolean txnRollbackFinal(long txnId) throws IOException { checkHighest(txnId); Transaction txn = mTransactions.removeValue(txnId); if (txn != null) { txn.reset(); } return true; }
@Override public boolean txnRollbackFinal(long txnId) throws IOException { checkHighest(txnId); Transaction txn = mTransactions.removeValue(txnId); if (txn != null) { txn.reset(); } return true; }
@Override public boolean txnCommitFinal(long txnId) throws IOException { checkHighest(txnId); LocalTransaction txn = mTransactions.removeValue(txnId); if (txn != null) { txn.commitAll(); } return true; }
@Override public boolean txnCommitFinal(long txnId) throws IOException { checkHighest(txnId); _LocalTransaction txn = mTransactions.removeValue(txnId); if (txn != null) { txn.commitAll(); } return true; }