/** * Returns the highest position within the original node as if it had not split. */ final int highestPos(Node node) { int pos; Node sibling = latchSibling(); if (node.isLeaf()) { pos = node.highestLeafPos() + 2 + sibling.highestLeafPos(); } else { pos = node.highestInternalPos() + 2 + sibling.highestInternalPos(); } sibling.releaseShared(); return pos; }
/** * Returns the highest position within the original node as if it had not split. */ final int highestPos(Node node) { int pos; Node sibling = latchSibling(); if (node.isLeaf()) { pos = node.highestLeafPos() + 2 + sibling.highestLeafPos(); } else { pos = node.highestInternalPos() + 2 + sibling.highestInternalPos(); } sibling.releaseShared(); return pos; }
/** * Returns the highest position within the original node as if it had not split. */ final int highestPos(Node node) { int pos; Node sibling = latchSibling(); if (node.isLeaf()) { pos = node.highestLeafPos() + 2 + sibling.highestLeafPos(); } else { pos = node.highestInternalPos() + 2 + sibling.highestInternalPos(); } sibling.releaseShared(); return pos; }
/** * Test method which confirms that cursor frame nodes are at an extremity. Method is not * tolerant of split nodes. * * @param extremity LOW_EXTREMITY or HIGH_EXTREMITY */ public final boolean verifyExtremities(byte extremity) throws IOException { Node node = latchRootNode(); try { while (true) { if ((node.type() & extremity) == 0) { return false; } if (node.isLeaf()) { return true; } int pos = 0; if (extremity == Node.HIGH_EXTREMITY) { pos = node.highestInternalPos(); } node = latchToChild(node, pos); } } finally { node.releaseShared(); } }
/** * Test method which confirms that cursor frame nodes are at an extremity. Method is not * tolerant of split nodes. * * @param extremity LOW_EXTREMITY or HIGH_EXTREMITY */ public final boolean verifyExtremities(byte extremity) throws IOException { Node node = latchRootNode(); try { while (true) { if ((node.type() & extremity) == 0) { return false; } if (node.isLeaf()) { return true; } int pos = 0; if (extremity == Node.HIGH_EXTREMITY) { pos = node.highestInternalPos(); } node = latchToChild(node, pos); } } finally { node.releaseShared(); } }
/** * Test method which confirms that cursor frame nodes are at an extremity. Method is not * tolerant of split nodes. * * @param extremity LOW_EXTREMITY or HIGH_EXTREMITY */ public final boolean verifyExtremities(byte extremity) throws IOException { Node node = latchRootNode(); try { while (true) { if ((node.type() & extremity) == 0) { return false; } if (node.isLeaf()) { return true; } int pos = 0; if (extremity == Node.HIGH_EXTREMITY) { pos = node.highestInternalPos(); } node = mTree.mDatabase.latchToChild(node, pos); } } finally { node.releaseShared(); } }
int childPos = node.highestInternalPos(); frame.bindOrReposition(node, childPos); node = mTree.mDatabase.latchToChild(node, childPos);
int childPos = node.highestInternalPos(); frame.bindOrReposition(node, childPos); if (node.isBottomInternal()) {
parentNode.deleteRightChildRef(parentNode.highestInternalPos()); } else { if (!deleteHighestNode(parentFrame, parentNode)) { int pos = parentNode.highestInternalPos(); Node previous = mTree.mDatabase.latchChildRetainParentEx(parentNode, pos, true);
int leftEndPos = leftNode.highestInternalPos(); InResult result = new InResult(); leftNode.createInternalEntry int pos = leftNode.highestInternalPos(); leftNode.createInternalEntry (null, result, tree, pos, encodedLen, (pos + 2) << 2, false);
int leftEndPos = leftNode.highestInternalPos(); InResult result = new InResult(); leftNode.createInternalEntry int pos = leftNode.highestInternalPos(); leftNode.createInternalEntry (null, result, tree, pos, encodedLen, (pos + 2) << 2, false);
int leftEndPos = leftNode.highestInternalPos(); InResult result = new InResult(); leftNode.createInternalEntry int pos = leftNode.highestInternalPos(); leftNode.createInternalEntry (null, result, tree, pos, encodedLen, (pos + 2) << 2, false);
final int highestPtr = childPtr + (highestInternalPos() << 2); for (; childPtr <= highestPtr; childPtr += 8) { long childId = p_uint48GetLE(mPage, childPtr);
final int highestPtr = childPtr + (highestInternalPos() << 2); for (; childPtr <= highestPtr; childPtr += 8) { long childId = p_uint48GetLE(mPage, childPtr);
final int highestPtr = childPtr + (highestInternalPos() << 2); for (; childPtr <= highestPtr; childPtr += 8) { long childId = p_uint48GetLE(mPage, childPtr);
int childPos = node.highestInternalPos(); frame.bindOrReposition(node, childPos); node = latchToChild(node, childPos);
int childPos = node.highestInternalPos(); frame.bindOrReposition(node, childPos); node = latchToChild(node, childPos);
final int highestPos = node.highestInternalPos(); while (true) { if (pos > highestPos) {
final int highestPos = node.highestInternalPos(); while (true) { if (pos > highestPos) {
final int highestPos = node.highestInternalPos(); while (true) { if (pos > highestPos) {