Class MetastorageTree
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.DataStructure
-
- org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree<MetastorageRow,MetastorageDataRow>
-
- org.apache.ignite.internal.processors.cache.persistence.metastorage.MetastorageTree
-
- All Implemented Interfaces:
IgniteTree<MetastorageRow,MetastorageDataRow>
public class MetastorageTree extends BPlusTree<MetastorageRow,MetastorageDataRow>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree
BPlusTree.Get, BPlusTree.Insert, BPlusTree.Invoke, BPlusTree.Put, BPlusTree.Remove, BPlusTree.RemoveRange, BPlusTree.Replace, BPlusTree.Result, BPlusTree.Search, BPlusTree.TreeRowClosure<L,T extends L>, BPlusTree.TreeRowFactory<L,T extends L>
-
Nested classes/interfaces inherited from interface org.apache.ignite.internal.util.IgniteTree
IgniteTree.InvokeClosure<T>, IgniteTree.OperationType
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_KEY_LENMax key length (bytes num)-
Fields inherited from class org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree
CONC_DESTROY_MSG, IGNITE_BPLUS_TREE_LOCK_RETRIES_DEFAULT, metaPageId, suspendFailureDiagnostic, testHndWrapper
-
Fields inherited from class org.apache.ignite.internal.processors.cache.persistence.DataStructure
grpId, grpName, metrics, pageFlag, pageIoRslvr, pageMem, reuseList, rnd, wal
-
-
Constructor Summary
Constructors Constructor Description MetastorageTree(int cacheId, String name, PageMemory pageMem, IgniteWriteAheadLogManager wal, AtomicLong globalRmvId, ReuseList reuseList, MetastorageRowStore rowStore, long metaPageId, boolean initNew, @Nullable FailureProcessor failureProcessor, PageLockTrackerManager pageLockTrackerManager, int partId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longallocatePageNoReuse()protected intcompare(BPlusIO<MetastorageRow> io, long pageAddr, int idx, MetastorageRow row)MetastorageDataRowgetRow(BPlusIO<MetastorageRow> io, long pageAddr, int idx, Object x)Get data row.MetastorageRowStorerowStore()-
Methods inherited from class org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree
acquirePage, checkDestroyed, compare, corruptedTreeException, destroy, destroy, destroyDownPages, destroyed, enableSequentialWriteMode, find, find, find, find, findFirst, findFirst, findLast, findLast, findOne, findOne, findOne, getFirstPageIds, getLockRetries, getMetaPageId, getRow, initTree, initTree, interruptAll, invoke, isEmpty, latestInnerIO, latestLeafIO, lockRetryErrorMessage, markDestroyed, maxLockHoldTime, printTree, processFailure, put, putx, read, read, remove, remove, removex, removex, rootLevel, setIos, size, size, statisticsHolder, temporaryReleaseLock, toString, treeName, validateTree
-
Methods inherited from class org.apache.ignite.internal.processors.cache.persistence.DataStructure
acquirePage, allocatePage, allocatePage, close, groupId, init, name, needWalDeltaRecord, pageSize, randomInt, read, read, readLock, readUnlock, recyclePage, releasePage, tryWriteLock, write, write, write, write, writeLock, writeUnlock, writeUnlock
-
-
-
-
Field Detail
-
MAX_KEY_LEN
public static final int MAX_KEY_LEN
Max key length (bytes num)- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MetastorageTree
public MetastorageTree(int cacheId, String name, PageMemory pageMem, IgniteWriteAheadLogManager wal, AtomicLong globalRmvId, ReuseList reuseList, MetastorageRowStore rowStore, long metaPageId, boolean initNew, @Nullable @Nullable FailureProcessor failureProcessor, PageLockTrackerManager pageLockTrackerManager, int partId) throws IgniteCheckedException- Parameters:
pageMem- Page memory instance.wal- WAL manager.globalRmvId- Global remove ID.metaPageId- Meta page ID.reuseList- Reuse list.rowStore- Row store.initNew- Init new flag, iftrue, then new tree will be allocated.failureProcessor- To call if the tree is corrupted.pageLockTrackerManager- Page lock tracker manager.- Throws:
IgniteCheckedException- If failed to initialize.
-
-
Method Detail
-
compare
protected int compare(BPlusIO<MetastorageRow> io, long pageAddr, int idx, MetastorageRow row) throws IgniteCheckedException
- Specified by:
comparein classBPlusTree<MetastorageRow,MetastorageDataRow>- Parameters:
io- IO.pageAddr- Page address.idx- Index of row in the given buffer.row- Lookup row.- Returns:
- Comparison result as in
Comparator.compare(Object, Object). - Throws:
IgniteCheckedException- If failed.
-
getRow
public MetastorageDataRow getRow(BPlusIO<MetastorageRow> io, long pageAddr, int idx, Object x) throws IgniteCheckedException
Get data row. Can be called on inner page only ifBPlusTree.canGetRowFromInneristrue.- Specified by:
getRowin classBPlusTree<MetastorageRow,MetastorageDataRow>- Parameters:
io- IO.pageAddr- Page address.idx- Index.x- Implementation specific argument,nullalways means that we need to return full detached data row.- Returns:
- Data row.
- Throws:
IgniteCheckedException- If failed.
-
rowStore
public MetastorageRowStore rowStore()
- Returns:
- RowStore.
-
allocatePageNoReuse
protected long allocatePageNoReuse() throws IgniteCheckedException- Overrides:
allocatePageNoReusein classDataStructure- Returns:
- Page ID of newly allocated page.
- Throws:
IgniteCheckedException- If failed.
-
-