Class BPlusTree.Remove
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Get
-
- org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Remove
-
- All Implemented Interfaces:
ReuseBag
- Direct Known Subclasses:
BPlusTree.RemoveRange
public class BPlusTree.Remove extends BPlusTree.Get implements ReuseBag
Remove operation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFreePage(long pageId)protected booleanceil()protected voiddoRemove(long pageId, long page, long pageAddr, Boolean walPlc, BPlusIO<L> io, int cnt, int idx)protected BPlusTree.ResultdoRemoveFromLeaf()protected BPlusTree.Resultfinish(BPlusTree.Result res)Finish the operation.protected BPlusTree.ResultfinishOrLockTail(long pageId, long page, long backId, long fwdId, int lvl)Method that's invoked when operation goes up from the recursion andBPlusTree.Get.isFinished()returns false.protected BPlusTree.ResultfinishTail()Process tail and finish.booleanisEmpty()protected booleanisRemoved()protected BPlusTree.ResultlockForward(int lvl)longpollFreePage()protected booleanreleaseForRetry(org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Tail<L> t)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.processors.cache.persistence.tree.BPlusTree.Get
row
-
-
-
-
Method Detail
-
pollFreePage
public long pollFreePage()
- Specified by:
pollFreePagein interfaceReuseBag- Returns:
- Free page ID for reuse or
0if empty.
-
addFreePage
public void addFreePage(long pageId)
- Specified by:
addFreePagein interfaceReuseBag- Parameters:
pageId- Free page ID for reuse.
-
isEmpty
public boolean isEmpty()
-
ceil
protected boolean ceil()
- Returns:
- Flag indicating that values are removed using an interval
(i.e.
BPlusTree.Get.rowspecifies the start of the interval, not an exact match).
-
finish
protected BPlusTree.Result finish(BPlusTree.Result res)
Finish the operation.
-
isRemoved
protected boolean isRemoved()
- Returns:
trueIf already removed from leaf.
-
releaseForRetry
protected boolean releaseForRetry(org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.Tail<L> t)
- Parameters:
t- Tail to release.- Returns:
trueIf we need to retry orfalseto exit.
-
finishTail
protected BPlusTree.Result finishTail() throws IgniteCheckedException
Process tail and finish. Same asfinishOrLockTail(long, long, long, long, int)but doesn't add the page to the tail.- Returns:
- Result.
- Throws:
IgniteCheckedException- If failed.
-
doRemoveFromLeaf
protected BPlusTree.Result doRemoveFromLeaf() throws IgniteCheckedException
- Returns:
- Result code.
- Throws:
IgniteCheckedException- If failed.
-
lockForward
protected BPlusTree.Result lockForward(int lvl) throws IgniteCheckedException
- Parameters:
lvl- Level.- Returns:
- Result code.
- Throws:
IgniteCheckedException- If failed.
-
removeDataRowFromLeaf
protected void removeDataRowFromLeaf(long pageId, long page, long pageAddr, Boolean walPlc, BPlusIO<L> io, int cnt, int idx) throws IgniteCheckedException- 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.
-
doRemove
protected void doRemove(long pageId, long page, long pageAddr, Boolean walPlc, BPlusIO<L> io, int cnt, int idx) throws IgniteCheckedException- 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.
-
finishOrLockTail
protected BPlusTree.Result finishOrLockTail(long pageId, long page, long backId, long fwdId, int lvl) throws IgniteCheckedException
Method that's invoked when operation goes up from the recursion andBPlusTree.Get.isFinished()returns false. Either finishes the operation or locks the page for further processing on another level. ReturnsBPlusTree.Result.FOUNDif operation has finished andBPlusTree.Get.isFinished()returnstruenow. ReturnsBPlusTree.Result.RETRYif operation should be retried. ReturnsBPlusTree.Result.NOT_FOUNDif operation has added the page to tail, meaning that operation can't be finished on current level.- Parameters:
pageId- Page ID.page- Page pointer.backId- Back page ID.fwdId- Forward ID.lvl- Level.- Returns:
- Result.
- Throws:
IgniteCheckedException- If failed.
-
-