Class OffHeapPageMetaInfoStore
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.diagnostic.pagelocktracker.store.OffHeapPageMetaInfoStore
-
- All Implemented Interfaces:
PageMetaInfoStore
public class OffHeapPageMetaInfoStore extends Object implements PageMetaInfoStore
-
-
Constructor Summary
Constructors Constructor Description OffHeapPageMetaInfoStore(int capacity, @Nullable MemoryCalculator memCalc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int itemIdx, int op, int structureId, long pageId, long pageAddrHeader, long pageAddr)Add page to store.intcapacity()PageMetaInfoStorecopy()voidfree()Free resource.intgetOperation(int itemIdx)longgetPageAddr(int itemIdx)longgetPageAddrHeader(int itemIdx)longgetPageId(int itemIdx)intgetStructureId(int itemIdx)booleanisEmpty()voidremove(int itemIdx)Remove page from store by index.
-
-
-
Constructor Detail
-
OffHeapPageMetaInfoStore
public OffHeapPageMetaInfoStore(int capacity, @Nullable @Nullable MemoryCalculator memCalc)
-
-
Method Detail
-
capacity
public int capacity()
- Specified by:
capacityin interfacePageMetaInfoStore- Returns:
- Capacity.
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacePageMetaInfoStore- Returns:
- True if empty.
-
add
public void add(int itemIdx, int op, int structureId, long pageId, long pageAddrHeader, long pageAddr)Add page to store.- Specified by:
addin interfacePageMetaInfoStore- Parameters:
itemIdx- Index of page in store.op- Page operation.structureId- Data structure id.pageId- Page id.pageAddrHeader- Page header addres.pageAddr- Page addres.
-
remove
public void remove(int itemIdx)
Remove page from store by index.- Specified by:
removein interfacePageMetaInfoStore
-
getOperation
public int getOperation(int itemIdx)
- Specified by:
getOperationin interfacePageMetaInfoStore- Parameters:
itemIdx- Index of page in store.- Returns:
- Page operation.
-
getStructureId
public int getStructureId(int itemIdx)
- Specified by:
getStructureIdin interfacePageMetaInfoStore- Parameters:
itemIdx- Index of page in store.- Returns:
- Data structure id.
-
getPageId
public long getPageId(int itemIdx)
- Specified by:
getPageIdin interfacePageMetaInfoStore- Parameters:
itemIdx- Index of page in store.- Returns:
- Page id.
-
getPageAddrHeader
public long getPageAddrHeader(int itemIdx)
- Specified by:
getPageAddrHeaderin interfacePageMetaInfoStore- Parameters:
itemIdx- Index of page in store.- Returns:
- Page header address.
-
getPageAddr
public long getPageAddr(int itemIdx)
- Specified by:
getPageAddrin interfacePageMetaInfoStore- Parameters:
itemIdx- Index of page in store.- Returns:
- Page address.
-
copy
public PageMetaInfoStore copy()
- Specified by:
copyin interfacePageMetaInfoStore- Returns:
- Copy of current store state.
-
free
public void free()
Free resource.- Specified by:
freein interfacePageMetaInfoStore
-
-