public class FullPageId extends Object
Generally, a full page ID consists of a cache ID and page ID. A page ID consists of page index (32 bits), partition ID (16 bits) and flags. Higher 8 bits of page ID are unused and reserved to address entries inside data pages or page ID rotation.
Partition ID 0xFFFF is reserved for index pages.
The structure of a page ID is shown in the diagram below:
+---------+-----------+------------+--------------------------+ | 8 bits | 8 bits | 16 bits | 32 bits | +---------+-----------+------------+--------------------------+ | OFFSET | FLAGS |PARTITION ID| PAGE INDEX | +---------+-----------+------------+--------------------------+
Page ID rotation
There are scenarios when we reference one page (B) from within another page (A) by page ID. It is also possible that this first page (B) is concurrently reused for a different purpose. In this case we should have a mechanism to determine that the reference from page (A) to page (B) is no longer valid. This is ensured by page ID rotation - together with page's (B) ID we should write some value that is incremented each time a page is reused (page ID rotation). This ID should be verified after page read and a page should be discarded if full ID is different.Effective page ID is page ID with zeroed bits used for page ID rotation.
| Modifier and Type | Field and Description |
|---|---|
static FullPageId |
NULL_PAGE |
| Constructor and Description |
|---|
FullPageId(long pageId,
int grpId) |
| Modifier and Type | Method and Description |
|---|---|
long |
effectivePageId() |
boolean |
equals(Object o) |
int |
groupId() |
int |
hashCode() |
static int |
hashCode(int grpId,
long pageId) |
long |
pageId() |
String |
toString() |
public static final FullPageId NULL_PAGE
public FullPageId(long pageId,
int grpId)
pageId - Page ID.grpId - Cache group ID.public static int hashCode(int grpId,
long pageId)
grpId - Cache group ID.pageId - Page ID.public long pageId()
public long effectivePageId()
public int groupId()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.9.0 Release Date : October 15 2020