Package org.apache.ignite.internal.pagemem

## Interface PageIdAllocator

All Known Subinterfaces:
  `PageMemory`, `PageMemoryEx`

All Known Implementing Classes:
  `PageMemoryImpl`, `PageMemoryNoStoreImpl`

    public interface PageIdAllocator

Allocates page ID's.

### Field Summary

Fields
`static byte` `FLAG_AUX` Flag for an internal structure page.
`static byte` `FLAG_DATA` Flag for a Data page.
`static byte` `FLAG_IDX` Flag for an index page.
`static int` `INDEX_PARTITION` Special partition reserved for index space.
`static int` `MAX_PARTITION_ID` Max partition ID that can be used by affinity.
`static long` `META_PAGE_ID` Cache group meta page id.

### Method Summary

All Methods Instance Methods Abstract Methods
`long` `allocatePage​(int grpId, int partId, byte flags)` Allocates a page from the space for the given partition ID and the given flags.
`boolean` `freePage​(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 IgniteCheckedException

Allocates 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.