/** * Caller must hold any latch. Returns true if node is any kind of internal node. */ boolean isInternal() { return (type() & 0xe0) == 0x60; }
/** * Caller must hold any latch. */ boolean isLeaf() { return type() < 0; }
/** * Caller must hold any latch. Returns true if node is any kind of internal node. */ boolean isInternal() { return (type() & 0xe0) == 0x60; }
/** * Caller must hold any latch. */ boolean isNonBottomInternal() { return (type() & 0xf0) == 0x60; }
/** * Caller must hold any latch. Returns true if node is any kind of internal node. */ boolean isInternal() { return (type() & 0xe0) == 0x60; }
/** * Caller must hold any latch. */ boolean isBottomInternal() { return (type() & 0xf0) == 0x70; }
/** * Caller must hold any latch. */ boolean isLeaf() { return type() < 0; }
/** * Caller must hold any latch. */ boolean isLeaf() { return type() < 0; }
/** * Caller must hold any latch. */ boolean isNonBottomInternal() { return (type() & 0xf0) == 0x60; }
void asEmptyRoot() { mId = 0; mCachedState = CACHED_CLEAN; type((byte) (TYPE_TN_LEAF | LOW_EXTREMITY | HIGH_EXTREMITY)); clearEntries(); }
/** * Caller must hold db commit lock. */ private Node allocUnevictableNode(long lowerNodeId) throws IOException { Node node = mDatabase.allocDirtyNode(NodeUsageList.MODE_UNEVICTABLE); node.type(Node.TYPE_UNDO_LOG); p_longPutLE(node.mPage, I_LOWER_NODE_ID, lowerNodeId); return node; }
boolean shouldMerge(int availBytes) { return mSplit == null && (((type() & (LOW_EXTREMITY | HIGH_EXTREMITY)) == 0 && availBytes >= ((pageSize(mPage) - TN_HEADER_SIZE) >> 1)) || !hasKeys()); }
/** * Returns a new or recycled Node instance, latched exclusively and marked * dirty. Caller must hold commit lock. */ Node allocDirtyFragmentNode() throws IOException { Node node = allocDirtyNode(); nodeMapPut(node); /*P*/ // [ node.type(TYPE_FRAGMENT); /*P*/ // ] return node; }
boolean shouldMerge(int availBytes) { return mSplit == null && (((type() & (LOW_EXTREMITY | HIGH_EXTREMITY)) == 0 && availBytes >= ((pageSize(mPage) - TN_HEADER_SIZE) >> 1)) || !hasKeys()); }
boolean shouldMerge(int availBytes) { return mSplit == null && (((type() & (LOW_EXTREMITY | HIGH_EXTREMITY)) == 0 && availBytes >= ((pageSize(mPage) - TN_HEADER_SIZE) >> 1)) || !hasKeys()); }
/** * Caller must hold db commit lock. */ private Node allocUnevictableNode(long lowerNodeId) throws IOException { Node node = mDatabase.allocDirtyNode(NodeUsageList.MODE_UNEVICTABLE); node.type(Node.TYPE_UNDO_LOG); p_longPutLE(node.mPage, I_LOWER_NODE_ID, lowerNodeId); return node; }