void treeClosed(Tree tree) { mOpenTreesLatch.acquireExclusive(); try { TreeRef ref = mOpenTreesById.getValue(tree.mId); if (ref != null && ref.get() == tree) { ref.clear(); if (tree.mName != null) { mOpenTrees.remove(tree.mName); } mOpenTreesById.remove(tree.mId); } } finally { mOpenTreesLatch.releaseExclusive(); } }
void treeClosed(Tree tree) { mOpenTreesLatch.acquireExclusive(); try { TreeRef ref = mOpenTreesById.getValue(tree.mId); if (ref != null && ref.get() == tree) { ref.clear(); if (tree.mName != null) { mOpenTrees.remove(tree.mName); } mOpenTreesById.remove(tree.mId); } } finally { mOpenTreesLatch.releaseExclusive(); } }
void treeClosed(_Tree tree) { mOpenTreesLatch.acquireExclusive(); try { _TreeRef ref = mOpenTreesById.getValue(tree.mId); if (ref != null && ref.get() == tree) { ref.clear(); if (tree.mName != null) { mOpenTrees.remove(tree.mName); } mOpenTreesById.remove(tree.mId); } } finally { mOpenTreesLatch.releaseExclusive(); } }
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(); } }
@Override public boolean deleteIndex(long txnId, long indexId) throws IOException { _LocalTransaction txn = txn(txnId); // Close the index for now. After recovery is complete, trashed indexes are deleted in // a separate thread. Index ix; { LHashTable.ObjEntry<Index> entry = mIndexes.remove(indexId); if (entry == null) { ix = mDatabase.anyIndexById(txn, indexId); } else { ix = entry.value; } } if (ix != null) { ix.close(); } return true; }
@Override public boolean deleteIndex(long txnId, long indexId) throws IOException { LocalTransaction txn = txn(txnId); // Close the index for now. After recovery is complete, trashed indexes are deleted in // a separate thread. Index ix; { LHashTable.ObjEntry<Index> entry = mIndexes.remove(indexId); if (entry == null) { ix = mDatabase.anyIndexById(txn, indexId); } else { ix = entry.value; } } if (ix != null) { ix.close(); } return true; }
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(); } }
@Override public boolean deleteIndex(long txnId, long indexId) throws IOException { _LocalTransaction txn = txn(txnId); // Close the index for now. After recovery is complete, trashed indexes are deleted in // a separate thread. Index ix; { LHashTable.ObjEntry<Index> entry = mIndexes.remove(indexId); if (entry == null) { ix = mDatabase.anyIndexById(txn, indexId); } else { ix = entry.value; } } if (ix != null) { ix.close(); } return true; }
@Override public boolean deleteIndex(long txnId, long indexId) throws IOException { LocalTransaction txn = txn(txnId); // Close the index for now. After recovery is complete, trashed indexes are deleted in // a separate thread. Index ix; { LHashTable.ObjEntry<Index> entry = mIndexes.remove(indexId); if (entry == null) { ix = mDatabase.anyIndexById(txn, indexId); } else { ix = entry.value; } } if (ix != null) { ix.close(); } return true; }
@Override public boolean deleteIndex(long txnId, long indexId) throws IOException { _LocalTransaction txn = txn(txnId); // Close the index for now. After recovery is complete, trashed indexes are deleted in // a separate thread. Index ix; { LHashTable.ObjEntry<Index> entry = mIndexes.remove(indexId); if (entry == null) { ix = mDatabase.anyIndexById(txn, indexId); } else { ix = entry.value; } } if (ix != null) { ix.close(); } return true; }
void treeClosed(Tree tree) { mOpenTreesLatch.acquireExclusive(); try { TreeRef ref = mOpenTreesById.getValue(tree.mId); if (ref != null && ref.get() == tree) { ref.clear(); if (tree.mName != null) { mOpenTrees.remove(tree.mName); } mOpenTreesById.remove(tree.mId); } } finally { mOpenTreesLatch.releaseExclusive(); } }
void treeClosed(_Tree tree) { mOpenTreesLatch.acquireExclusive(); try { _TreeRef ref = mOpenTreesById.getValue(tree.mId); if (ref != null && ref.get() == tree) { ref.clear(); if (tree.mName != null) { mOpenTrees.remove(tree.mName); } mOpenTreesById.remove(tree.mId); } } finally { mOpenTreesLatch.releaseExclusive(); } }
@Override public boolean deleteIndex(long txnId, long indexId) throws IOException { LocalTransaction txn = txn(txnId); // Close the index for now. After recovery is complete, trashed indexes are deleted in // a separate thread. Index ix; { LHashTable.ObjEntry<Index> entry = mIndexes.remove(indexId); if (entry == null) { ix = mDatabase.anyIndexById(txn, indexId); } else { ix = entry.value; } } if (ix != null) { ix.close(); } return true; }
public V removeValue(long key) { ObjEntry<V> entry = remove(key); return entry == null ? null : entry.value; }
void treeClosed(_Tree tree) { mOpenTreesLatch.acquireExclusive(); try { _TreeRef ref = mOpenTreesById.getValue(tree.mId); if (ref != null && ref.get() == tree) { ref.clear(); if (tree.mName != null) { mOpenTrees.remove(tree.mName); } mOpenTreesById.remove(tree.mId); } } finally { mOpenTreesLatch.releaseExclusive(); } }
@Override public boolean cursorUnregister(long cursorId) { LHashTable.ObjEntry<_TreeCursor> entry = mCursors.remove(cursorId); if (entry != null) { entry.value.reset(); } return true; }
@Override public boolean cursorUnregister(long cursorId) { LHashTable.ObjEntry<TreeCursor> entry = mCursors.remove(cursorId); if (entry != null) { entry.value.reset(); } return true; }
public V removeValue(long key) { ObjEntry<V> entry = remove(key); return entry == null ? null : entry.value; }
public V removeValue(long key) { ObjEntry<V> entry = remove(key); return entry == null ? null : entry.value; }