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 de-allocated and allocated again for a different purpose. In this case we should have a mechanism to determine that page (B) cannot be used after reading it's ID in page (A). 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 de-allocated (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.
public FullPageId(long pageId, int cacheId)
pageId
- Page ID.cacheId
- Cache ID.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017