/** * Update an internal node key to be larger than what is currently allocated. Caller must * ensure that node has enough space available and that it's not split. New key must not * force this node to split. Key MUST be a normal, non-fragmented key. * * @param pos must be positive * @param growth key size growth * @param key normal unencoded key */ void updateInternalKey(int pos, int growth, byte[] key, int encodedLen) { int entryLoc = doUpdateInternalKey(pos, growth, encodedLen); encodeNormalKey(key, mPage, entryLoc); }
/** * Update an internal node key to be larger than what is currently allocated. Caller must * ensure that node has enough space available and that it's not split. New key must not * force this node to split. Key MUST be a normal, non-fragmented key. * * @param pos must be positive * @param growth key size growth * @param key normal unencoded key */ void updateInternalKey(int pos, int growth, byte[] key, int encodedLen) { int entryLoc = doUpdateInternalKey(pos, growth, encodedLen); encodeNormalKey(key, mPage, entryLoc); }
/** * Update an internal node key to be larger than what is currently allocated. Caller must * ensure that node has enough space available and that it's not split. New key must not * force this node to split. Key MUST be a normal, non-fragmented key. * * @param pos must be positive * @param growth key size growth * @param key normal unencoded key */ void updateInternalKey(int pos, int growth, byte[] key, int encodedLen) { int entryLoc = doUpdateInternalKey(pos, growth, encodedLen); encodeNormalKey(key, mPage, entryLoc); }
/** * @param dest destination page of parent internal node * @param destLoc location in destination page * @return updated destLoc */ final int copySplitKeyToParent(final /*P*/ byte[] dest, final int destLoc) { byte[] actualKey = mActualKey; if (actualKey == mFullKey) { return Node.encodeNormalKey(actualKey, dest, destLoc); } else { return Node.encodeFragmentedKey(actualKey, dest, destLoc); } } }
/** * @param dest destination page of parent internal node * @param destLoc location in destination page * @return updated destLoc */ final int copySplitKeyToParent(final /*P*/ byte[] dest, final int destLoc) { byte[] actualKey = mActualKey; if (actualKey == mFullKey) { return Node.encodeNormalKey(actualKey, dest, destLoc); } else { return Node.encodeFragmentedKey(actualKey, dest, destLoc); } } }
/** * @param dest destination page of parent internal node * @param destLoc location in destination page * @return updated destLoc */ final int copySplitKeyToParent(final /*P*/ byte[] dest, final int destLoc) { byte[] actualKey = mActualKey; if (actualKey == mFullKey) { return Node.encodeNormalKey(actualKey, dest, destLoc); } else { return Node.encodeFragmentedKey(actualKey, dest, destLoc); } } }
/** * @param okey original key * @param akey key to actually store * @param vfrag 0 or ENTRY_FRAGMENTED */ private void copyToLeafEntry(byte[] okey, byte[] akey, int vfrag, byte[] value, int entryLoc) { final /*P*/ byte[] page = mPage; int vloc = okey == akey ? encodeNormalKey(akey, page, entryLoc) : encodeFragmentedKey(akey, page, entryLoc); copyToLeafValue(page, vfrag, value, vloc); }
/** * @param okey original key * @param akey key to actually store * @param vfrag 0 or ENTRY_FRAGMENTED */ private void copyToLeafEntry(byte[] okey, byte[] akey, int vfrag, byte[] value, int entryLoc) { final /*P*/ byte[] page = mPage; int vloc = okey == akey ? encodeNormalKey(akey, page, entryLoc) : encodeFragmentedKey(akey, page, entryLoc); copyToLeafValue(page, vfrag, value, vloc); }
/** * @param okey original key * @param akey key to actually store * @param vfrag 0 or ENTRY_FRAGMENTED */ private void copyToLeafEntry(byte[] okey, byte[] akey, int vfrag, byte[] value, int entryLoc) { final /*P*/ byte[] page = mPage; int vloc = okey == akey ? encodeNormalKey(akey, page, entryLoc) : encodeFragmentedKey(akey, page, entryLoc); copyToLeafValue(page, vfrag, value, vloc); }
entryLoc = compactLeaf(encodedLen, pos, false); page = mPage; entryLoc = isOriginal ? encodeNormalKey(akey, page, entryLoc) : encodeFragmentedKey(akey, page, entryLoc); copyToLeafValue(page, vfrag, value, entryLoc); entryLoc = compactLeaf(encodedLen, pos, false); page = mPage; entryLoc = isOriginal ? encodeNormalKey(akey, page, entryLoc) : encodeFragmentedKey(akey, page, entryLoc); copyToLeafValue(page, vfrag, value, entryLoc);
entryLoc = compactLeaf(encodedLen, pos, false); page = mPage; entryLoc = isOriginal ? encodeNormalKey(akey, page, entryLoc) : encodeFragmentedKey(akey, page, entryLoc); copyToLeafValue(page, vfrag, value, entryLoc); entryLoc = compactLeaf(encodedLen, pos, false); page = mPage; entryLoc = isOriginal ? encodeNormalKey(akey, page, entryLoc) : encodeFragmentedKey(akey, page, entryLoc); copyToLeafValue(page, vfrag, value, entryLoc);
entryLoc = compactLeaf(encodedLen, pos, false); page = mPage; entryLoc = isOriginal ? encodeNormalKey(akey, page, entryLoc) : encodeFragmentedKey(akey, page, entryLoc); copyToLeafValue(page, vfrag, value, entryLoc); entryLoc = compactLeaf(encodedLen, pos, false); page = mPage; entryLoc = isOriginal ? encodeNormalKey(akey, page, entryLoc) : encodeFragmentedKey(akey, page, entryLoc); copyToLeafValue(page, vfrag, value, entryLoc);
encodeNormalKey(newKey, parentPage, parentKeyLoc); parent.garbage(parent.garbage() - parentKeyGrowth); } else {
encodeNormalKey(newKey, parentPage, parentKeyLoc); parent.garbage(parent.garbage() - parentKeyGrowth); } else {
encodeNormalKey(newKey, parentPage, parentKeyLoc); parent.garbage(parent.garbage() - parentKeyGrowth); } else {
encodeNormalKey(newKey, parentPage, parentKeyLoc); parent.garbage(parent.garbage() - parentKeyGrowth); } else {
encodeNormalKey(newKey, parentPage, parentKeyLoc); parent.garbage(parent.garbage() - parentKeyGrowth); } else {
encodeNormalKey(newKey, parentPage, parentKeyLoc); parent.garbage(parent.garbage() - parentKeyGrowth); } else {