Interface PageIdAllocator
-
- All Known Subinterfaces:
PageMemory,PageMemoryEx
- All Known Implementing Classes:
PageMemoryImpl,PageMemoryNoStoreImpl
public interface PageIdAllocatorAllocates page ID's.
-
-
Field Summary
Fields Modifier and Type Field Description static byteFLAG_AUXFlag for an internal structure page.static byteFLAG_DATAFlag for a Data page.static byteFLAG_IDXFlag for an index page.static intINDEX_PARTITIONSpecial partition reserved for index space.static intMAX_PARTITION_IDMax partition ID that can be used by affinity.static longMETA_PAGE_IDCache group meta page id.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longallocatePage(int grpId, int partId, byte flags)Allocates a page from the space for the given partition ID and the given flags.booleanfreePage(int grpId, long pageId)The given page is free now.
-
-
-
Field Detail
-
FLAG_DATA
static final byte FLAG_DATA
Flag for a Data page. Also used by partition meta and tracking pages. This type doesn't use the Page ID rotation mechanism.- See Also:
- Constant Field Values
-
FLAG_IDX
static final byte FLAG_IDX
Flag for an index page. Also used by internal structure in in-memory caches. This type uses the Page ID rotation mechanism.- See Also:
- Constant Field Values
-
FLAG_AUX
static final byte FLAG_AUX
Flag for an internal structure page. This type uses the Page ID rotation mechanism.- See Also:
- Constant Field Values
-
MAX_PARTITION_ID
static final int MAX_PARTITION_ID
Max partition ID that can be used by affinity.- See Also:
- Constant Field Values
-
INDEX_PARTITION
static final int INDEX_PARTITION
Special partition reserved for index space.- See Also:
- Constant Field Values
-
META_PAGE_ID
static final long META_PAGE_ID
Cache group meta page id.
-
-
Method Detail
-
allocatePage
long allocatePage(int grpId, int partId, byte flags) throws IgniteCheckedExceptionAllocates a page from the space for the given partition ID and the given flags.- Parameters:
grpId- Cache Group ID.partId- Partition ID.- Returns:
- Allocated page ID.
- Throws:
IgniteCheckedException
-
freePage
boolean freePage(int grpId, long pageId)The given page is free now.- Parameters:
grpId- Cache Group ID.pageId- Page ID.
-
-