/** * Moves the cursor to the first subtree leaf node, which might be empty or full of * ghosts. Leaf frame remains latched when method returns normally. * * @param frame frame to bind node to * @param node latched node; can have no keys * @return latched first node, possibly empty, bound by mLeaf frame */ private Node toFirstLeaf(CursorFrame frame, Node node) throws IOException { try { while (true) { frame.bind(node, 0); if (node.mSplit != null) { node = finishSplitShared(frame, node); if (frame.mNodePos != 0) { // Rebind if position changed (possibly negative). frame.bindOrReposition(node, 0); } } if (node.isLeaf()) { mLeaf = frame; return node; } node = latchToChild(node, 0); frame = new CursorFrame(frame); } } catch (Throwable e) { throw cleanup(e, frame); } }
/** * Moves the cursor to the first subtree internal node, which might be empty. Node remains * latched when method returns normally. * * @param frame frame to bind node to * @param node latched internal node; can have no keys * @return latched first internal node, possibly empty, bound by mFrame */ private Node toFirstInternal(CursorFrame frame, Node node) throws IOException { try { while (true) { frame.bind(node, 0); if (node.mSplit != null) { node = finishSplitShared(frame, node); if (frame.mNodePos != 0) { // Rebind if position changed (possibly negative). frame.bindOrReposition(node, 0); } } if (node.isBottomInternal()) { mFrame = frame; return node; } node = mTree.mDatabase.latchToChild(node, 0); frame = new CursorFrame(frame); } } catch (Throwable e) { throw cleanup(e, frame); } }
/** * Moves the cursor to the first subtree leaf node, which might be empty or full of * ghosts. Leaf frame remains latched when method returns normally. * * @param frame frame to bind node to * @param node latched node; can have no keys * @return latched first node, possibly empty, bound by mLeaf frame */ private Node toFirstLeaf(CursorFrame frame, Node node) throws IOException { try { while (true) { frame.bind(node, 0); if (node.mSplit != null) { node = finishSplitShared(frame, node); if (frame.mNodePos != 0) { // Rebind if position changed (possibly negative). frame.bindOrReposition(node, 0); } } if (node.isLeaf()) { mLeaf = frame; return node; } node = latchToChild(node, 0); frame = new CursorFrame(frame); } } catch (Throwable e) { throw cleanup(e, frame); } }
/** * Moves the cursor to the first subtree leaf node, which might be empty or full of * ghosts. Leaf frame remains latched when method returns normally. * * @param frame frame to bind node to * @param node latched node; can have no keys * @return latched first node, possibly empty, bound by mFrame */ private Node toFirstLeaf(CursorFrame frame, Node node) throws IOException { try { while (true) { frame.bind(node, 0); if (node.mSplit != null) { node = finishSplitShared(frame, node); if (frame.mNodePos != 0) { // Rebind if position changed (possibly negative). frame.bindOrReposition(node, 0); } } if (node.isLeaf()) { mFrame = frame; return node; } node = mTree.mDatabase.latchToChild(node, 0); frame = new CursorFrame(frame); } } catch (Throwable e) { throw cleanup(e, frame); } }
throw cleanup(e, frame);
throw cleanup(e, frame);
} catch (Throwable e) { node.releaseShared(); throw cleanup(e, frame); } catch (Throwable e) { node.releaseShared(); throw cleanup(e, frame); } catch (Throwable e) { node.releaseShared(); throw cleanup(e, frame); node = latchToChild(node, childPos); } catch (Throwable e) { throw cleanup(e, frame); node.releaseShared(); sibling.releaseShared(); throw cleanup(e, frame); node = latchToChild(selected, selectedPos); } catch (Throwable e) { throw cleanup(e, frame);
} catch (Throwable e) { node.releaseShared(); throw cleanup(e, frame); } catch (Throwable e) { node.releaseShared(); throw cleanup(e, frame); } catch (Throwable e) { node.releaseShared(); throw cleanup(e, frame); node = latchToChild(node, childPos); } catch (Throwable e) { throw cleanup(e, frame); node.releaseShared(); sibling.releaseShared(); throw cleanup(e, frame); node = latchToChild(selected, selectedPos); } catch (Throwable e) { throw cleanup(e, frame);
} catch (Throwable e) { node.releaseShared(); throw cleanup(e, frame); } catch (Throwable e) { node.releaseShared(); throw cleanup(e, frame); } catch (Throwable e) { node.releaseShared(); throw cleanup(e, frame); node = mTree.mDatabase.latchToChild(node, childPos); } catch (Throwable e) { throw cleanup(e, frame); node.releaseShared(); sibling.releaseShared(); throw cleanup(e, frame); node = mTree.mDatabase.latchToChild(selected, selectedPos); } catch (Throwable e) { throw cleanup(e, frame);
throw cleanup(e, frame);
throw cleanup(e, frame);