org.apache.ignite.internal.pagemem

## Class FullPageId

- java.lang.Object
- - org.apache.ignite.internal.pagemem.FullPageId

    public class FullPageId
    extends Object

Compound object used to address a page in the global page space.

### Page ID structure

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.

### Constructor Summary

Constructors
Constructor and Description
`FullPageId(long pageId, int grpId)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`long` `effectivePageId()`
`boolean` `equals(Object o)`
`int` `groupId()`
`int` `hashCode()`
`static int` `hashCode(int grpId, long pageId)`
`long` `pageId()`
`String` `toString()`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### FullPageId

    public FullPageId(long pageId,
                      int grpId)

Parameters:
  `pageId` - Page ID.
  `grpId` - Cache group ID.

### Method Detail

#### hashCode

    public static int hashCode(int grpId,
                               long pageId)

Parameters:
  `grpId` - Cache group ID.
  `pageId` - Page ID.
Returns:
  Hash code.

#### pageId

    public long pageId()

Returns:
  Page ID.

#### effectivePageId

    public long effectivePageId()

Returns:
  Effective page ID.

#### groupId

    public int groupId()

Returns:
  Cache group ID.

#### equals

    public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.8.0
Release Date | : February 27 2020