private void cleanupUnreferencedTree(TreeRef ref) throws IOException { Node root = ref.mRoot; root.acquireShared(); try { mOpenTreesLatch.acquireExclusive(); try { LHashTable.ObjEntry<TreeRef> entry = mOpenTreesById.get(ref.mId); if (entry == null || entry.value != ref) { return; } if (ref.mName != null) { mOpenTrees.remove(ref.mName); } mOpenTreesById.remove(ref.mId); root.makeEvictableNow(); if (root.mId != 0) { nodeMapPut(root); } } finally { mOpenTreesLatch.releaseExclusive(); } } finally { root.releaseShared(); } }
private void cleanupUnreferencedTree(TreeRef ref) throws IOException { Node root = ref.mRoot; root.acquireShared(); try { mOpenTreesLatch.acquireExclusive(); try { LHashTable.ObjEntry<TreeRef> entry = mOpenTreesById.get(ref.mId); if (entry == null || entry.value != ref) { return; } if (ref.mName != null) { mOpenTrees.remove(ref.mName); } mOpenTreesById.remove(ref.mId); root.makeEvictableNow(); if (root.mId != 0) { nodeMapPut(root); } } finally { mOpenTreesLatch.releaseExclusive(); } } finally { root.releaseShared(); } }
private void cleanupUnreferencedTree(TreeRef ref) throws IOException { Node root = ref.mRoot; root.acquireShared(); try { mOpenTreesLatch.acquireExclusive(); try { LHashTable.ObjEntry<TreeRef> entry = mOpenTreesById.get(ref.mId); if (entry == null || entry.value != ref) { return; } if (ref.mName != null) { mOpenTrees.remove(ref.mName); } mOpenTreesById.remove(ref.mId); root.makeEvictableNow(); if (root.mId != 0) { nodeMapPut(root); } } finally { mOpenTreesLatch.releaseExclusive(); } } finally { root.releaseShared(); } }
/** * @return latched, unevictable node */ private static Node readUndoLogNode(LocalDatabase db, long nodeId) throws IOException { Node node = db.allocLatchedNode(nodeId, NodeUsageList.MODE_UNEVICTABLE); try { node.read(db, nodeId); if (node.type() != Node.TYPE_UNDO_LOG) { throw new CorruptDatabaseException ("Not an undo log node type: " + node.type() + ", id: " + nodeId); } return node; } catch (Throwable e) { node.makeEvictableNow(); node.releaseExclusive(); throw e; } } }
/** * @return latched, unevictable node */ private static Node readUndoLogNode(LocalDatabase db, long nodeId) throws IOException { Node node = db.allocLatchedNode(nodeId, NodeUsageList.MODE_UNEVICTABLE); try { node.read(db, nodeId); if (node.type() != Node.TYPE_UNDO_LOG) { throw new CorruptDatabaseException ("Not an undo log node type: " + node.type() + ", id: " + nodeId); } return node; } catch (Throwable e) { node.makeEvictableNow(); node.releaseExclusive(); throw e; } } }
/** * @return latched, unevictable node */ private static Node readUndoLogNode(LocalDatabase db, long nodeId) throws IOException { Node node = db.allocLatchedNode(nodeId, NodeContext.MODE_UNEVICTABLE); try { node.read(db, nodeId); if (node.type() != Node.TYPE_UNDO_LOG) { throw new CorruptDatabaseException ("Not an undo log node type: " + node.type() + ", id: " + nodeId); } return node; } catch (Throwable e) { node.makeEvictableNow(); node.releaseExclusive(); throw e; } } }
rootNode.makeEvictableNow(); throw e;
rootNode.makeEvictableNow(); throw e;
return rootNode; } catch (Throwable e) { rootNode.makeEvictableNow(); throw e;
try { mDatabase.treeClosed(this); newRoot.makeEvictableNow(); if (newRoot.mId > 0) { mDatabase.nodeMapPut(newRoot);
try { mDatabase.treeClosed(this); newRoot.makeEvictableNow(); if (newRoot.mId > 0) { mDatabase.nodeMapPut(newRoot);
try { mDatabase.treeClosed(this); newRoot.makeEvictableNow(); if (newRoot.mId > 0) { mDatabase.nodeMapPut(newRoot);