Class BPlusTree.RemoveRange
- All Implemented Interfaces:
ReuseBag
The operation of deleting a range of values.
Performs the removal of several elements from the leaf at once.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRemoveRange(L lower, L upper, boolean needOld, int limit) -
Method Summary
Modifier and TypeMethodDescriptionprotected final org.apache.ignite.internal.persistence.tree.BPlusTree.Tail<L>final booleancanRelease(long pageId, int lvl) protected booleanceil()protected final booleancheckTailLevel(int rootLvl) protected final voiddoReleaseTail(org.apache.ignite.internal.persistence.tree.BPlusTree.Tail<L> t) protected BPlusTree.Resultfinish(BPlusTree.Result res) Finish the operation.protected final org.apache.ignite.internal.persistence.tree.BPlusTree.Tail<L>protected final intinsertionPoint(org.apache.ignite.internal.persistence.tree.BPlusTree.Tail<L> tail) protected final booleanisTail(long pageId, int lvl) protected final StringprintTail(boolean keys) protected booleanreleaseForRetry(org.apache.ignite.internal.persistence.tree.BPlusTree.Tail<L> t) protected final voidRelease pages for all locked levels at the tail.protected voidremoveDataRowFromLeaf(long pageId, long page, long pageAddr, Boolean walPlc, BPlusIO<L> io, int cnt, int idx) Methods inherited from class org.apache.ignite.internal.persistence.tree.BPlusTree.Remove
addFreePage, doRemove, doRemoveFromLeaf, finishOrLockTail, finishTail, isEmpty, isRemoved, lockForward, pollFreePageMethods inherited from class org.apache.ignite.internal.persistence.tree.BPlusTree.Get
row
-
Constructor Details
-
RemoveRange
- Parameters:
lower- Lower bound (inclusive).upper- Upper bound (inclusive).needOld-TrueIf need return old value.
-
-
Method Details
-
ceil
protected boolean ceil() -
removeDataRowFromLeaf
protected void removeDataRowFromLeaf(long pageId, long page, long pageAddr, Boolean walPlc, BPlusIO<L> io, int cnt, int idx) throws IgniteCheckedException - Overrides:
removeDataRowFromLeafin classBPlusTree<L,T extends L>.Remove - Parameters:
pageId- Page ID.page- Page pointer.pageAddr- Page address.walPlc- Full page WAL record policy.io- IO.cnt- Count.idx- Index to remove.- Throws:
IgniteCheckedException- If failed.
-
releaseForRetry
protected boolean releaseForRetry(org.apache.ignite.internal.persistence.tree.BPlusTree.Tail<L> t) throws IgniteCheckedException - Overrides:
releaseForRetryin classBPlusTree<L,T extends L>.Remove - Parameters:
t- Tail to release.- Returns:
trueIf we need to retry orfalseto exit.- Throws:
IgniteCheckedException
-
finish
Finish the operation. -
releaseTail
Release pages for all locked levels at the tail.- Throws:
IgniteCheckedException
-
checkTailLevel
protected final boolean checkTailLevel(int rootLvl) - Parameters:
rootLvl- Actual root level.- Returns:
trueIf tail level is correct.
-
doReleaseTail
protected final void doReleaseTail(org.apache.ignite.internal.persistence.tree.BPlusTree.Tail<L> t) throws IgniteCheckedException - Parameters:
t- Tail.- Throws:
IgniteCheckedException- If failed.
-
canRelease
public final boolean canRelease(long pageId, int lvl) -
isTail
protected final boolean isTail(long pageId, int lvl) - Parameters:
pageId- Page ID.lvl- Level.- Returns:
trueIf the given page is in tail.
-
addTail
protected final org.apache.ignite.internal.persistence.tree.BPlusTree.Tail<L> addTail(long pageId, long page, long pageAddr, BPlusIO<L> io, int lvl, byte type) - Parameters:
pageId- Page ID.page- Page pointer.pageAddr- Page address.io- IO.lvl- Level.type- Type.- Returns:
- Added tail.
-
getTail
protected final org.apache.ignite.internal.persistence.tree.BPlusTree.Tail<L> getTail(org.apache.ignite.internal.persistence.tree.BPlusTree.Tail<L> tail, int lvl) - Parameters:
tail- Tail to start with.lvl- Level.- Returns:
- Tail of
BPlusTree.Tail.EXACTtype at the given level.
-
insertionPoint
protected final int insertionPoint(org.apache.ignite.internal.persistence.tree.BPlusTree.Tail<L> tail) throws IgniteCheckedException - Parameters:
tail- Tail.- Returns:
- Insertion point. May be negative.
- Throws:
IgniteCheckedException- If failed.
-
printTail
- Parameters:
keys- If we have to show keys.- Returns:
- Tail as a String.
- Throws:
IgniteCheckedException- If failed.
-