/** * Returns true if non-leaf is not split and underutilized. If so, it should be * merged with its neighbors, and possibly deleted. Caller must hold any latch. */ boolean shouldInternalMerge() { return shouldMerge(availableInternalBytes()); }
/** * Returns true if non-leaf is not split and underutilized. If so, it should be * merged with its neighbors, and possibly deleted. Caller must hold any latch. */ boolean shouldInternalMerge() { return shouldMerge(availableInternalBytes()); }
/** * Returns true if non-leaf is not split and underutilized. If so, it should be * merged with its neighbors, and possibly deleted. Caller must hold any latch. */ boolean shouldInternalMerge() { return shouldMerge(availableInternalBytes()); }
/** * Returns true if leaf is not split and underutilized. If so, it should be * merged with its neighbors, and possibly deleted. Caller must hold any latch. */ boolean shouldLeafMerge() { return shouldMerge(availableLeafBytes()); }
/** * Returns true if leaf is not split and underutilized. If so, it should be * merged with its neighbors, and possibly deleted. Caller must hold any latch. */ boolean shouldLeafMerge() { return shouldMerge(availableLeafBytes()); }
/** * Returns true if leaf is not split and underutilized. If so, it should be * merged with its neighbors, and possibly deleted. Caller must hold any latch. */ boolean shouldLeafMerge() { return shouldMerge(availableLeafBytes()); }
if (!node.shouldMerge(nodeAvail = node.availableInternalBytes())) { if (leftNode != null) { leftNode.releaseExclusive();
if (!node.shouldMerge(nodeAvail = node.availableInternalBytes())) { node.releaseExclusive(); parentNode.releaseExclusive();
if (!node.shouldMerge(nodeAvail = node.availableLeafBytes())) { if (leftNode != null) { leftNode.releaseExclusive();
if (!node.shouldMerge(nodeAvail = node.availableLeafBytes())) { node.releaseExclusive(); parentNode.releaseExclusive();
if (!node.shouldMerge(nodeAvail = node.availableInternalBytes())) { node.releaseExclusive(); parentNode.releaseExclusive();
if (!node.shouldMerge(nodeAvail)) { node.releaseExclusive(); parentNode.releaseExclusive();