public final class PageIdUtils extends Object
FullPageId| Modifier and Type | Field and Description |
|---|---|
static long |
FLAG_MASK
Flags mask.
|
static int |
FLAG_SIZE |
static int |
MAX_ITEMID_NUM
Max itemid number.
|
static long |
MAX_PAGE_NUM
Maximum page number.
|
static int |
MAX_PART_ID
Maximum page number.
|
static long |
OFFSET_MASK |
static int |
OFFSET_SIZE |
static long |
PAGE_IDX_MASK |
static int |
PAGE_IDX_SIZE |
static long |
PART_ID_MASK
Page Index is a monotonically growing number within each partition
|
static int |
PART_ID_SIZE |
static long |
TAG_MASK |
static int |
TAG_SIZE |
| Modifier and Type | Method and Description |
|---|---|
static long |
changePartitionId(long pageId,
int partId) |
static long |
changeType(long pageId,
byte type)
Change page type.
|
static long |
effectivePageId(long link) |
static byte |
flag(long pageId) |
static boolean |
isEffectivePageId(long pageId) |
static int |
itemId(long link)
Index of the item inside of data page.
|
static long |
link(long pageId,
int itemId)
Constructs a page link by the given page ID and 8-byte words within the page.
|
static long |
maskPartitionId(long pageId)
Masks partition ID from full page ID.
|
static long |
pageId(int partId,
byte flag,
int pageIdx) |
static long |
pageId(long link)
Extracts a page ID from the given page link.
|
static int |
pageIndex(long pageId)
Extracts a page index from the given page ID.
|
static int |
partId(long pageId) |
static long |
rotatePageId(long pageId) |
static long |
rotationId(long pageId)
Returns the Rotation ID of a page identified by the given ID.
|
static int |
tag(long link)
Tag of pageId
|
static String |
toDetailString(long pageId) |
public static final int PAGE_IDX_SIZE
public static final int PART_ID_SIZE
public static final int FLAG_SIZE
public static final int OFFSET_SIZE
public static final int TAG_SIZE
public static final long PAGE_IDX_MASK
public static final long OFFSET_MASK
public static final long TAG_MASK
public static final long PART_ID_MASK
public static final long FLAG_MASK
public static final int MAX_ITEMID_NUM
public static final long MAX_PAGE_NUM
public static final int MAX_PART_ID
public static long link(long pageId,
int itemId)
pageId - Page ID.itemId - Item ID.public static int pageIndex(long pageId)
pageId - Page ID.public static long pageId(long link)
link - Page link.public static long effectivePageId(long link)
link - Page link.public static boolean isEffectivePageId(long pageId)
pageId - Page id.True if page id is equal to effective page id.public static int itemId(long link)
link - Page link.public static int tag(long link)
link - Page link.public static long pageId(int partId,
byte flag,
int pageIdx)
partId - Partition ID.flag - Flags (a number of reserved bits, and page type (data/index page))pageIdx - Page index, monotonically growing number within each partitionFullPageIdpublic static byte flag(long pageId)
pageId - Page ID.public static int partId(long pageId)
pageId - Page ID.public static long rotationId(long pageId)
public static long rotatePageId(long pageId)
pageId - Page ID.public static long maskPartitionId(long pageId)
pageId - Page ID to mask partition ID from.public static long changeType(long pageId,
byte type)
pageId - Old page ID.type - New page type.public static String toDetailString(long pageId)
pageId - Page id.public static long changePartitionId(long pageId,
int partId)
pageId - Page ID.partId - Partition ID.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.11.0 Release Date : September 11 2021