org.apache.ignite.internal.pagemem

## Interface PageSupport

All Known Subinterfaces:
  PageMemory, PageMemoryEx

All Known Implementing Classes:
  PageMemoryImpl, PageMemoryNoStoreImpl

    public interface PageSupport

Supports operations on pages.

### Method Summary

All Methods Instance Methods Abstract Methods
`long` `acquirePage(int grpId, long pageId)` Gets the page absolute pointer associated with the given page ID.
`boolean` `isDirty(int grpId, long pageId, long page)`
`long` `readLock(int grpId, long pageId, long page)`
`long` `readLockForce(int grpId, long pageId, long page)` Obtains read lock without checking page tag.
`void` `readUnlock(int grpId, long pageId, long page)` Releases locked page.
`void` `releasePage(int grpId, long pageId, long page)`
`long` `tryWriteLock(int grpId, long pageId, long page)`
`long` `writeLock(int grpId, long pageId, long page)`
`void` `writeUnlock(int grpId, long pageId, long page, Boolean walPlc, boolean dirtyFlag)` Releases locked page.

### Method Detail

#### acquirePage

    long acquirePage(int grpId,
                     long pageId)
              throws IgniteCheckedException

Gets the page absolute pointer associated with the given page ID. Each page obtained with this method must be released by calling `releasePage(int, long, long)`. This method will allocate page with given ID if it doesn't exist.

Parameters:
  `grpId` - Cache group ID.
  `pageId` - Page ID.
Returns:
  Page pointer.
Throws:
  `IgniteCheckedException` - If failed.

#### releasePage

    void releasePage(int grpId,
                     long pageId,
                     long page)

Parameters:
  `grpId` - Cache group ID.
  `pageId` - Page ID to release.
  `page` - Page pointer.

#### readLock

    long readLock(int grpId,
                  long pageId,
                  long page)

Parameters:
  `grpId` - Cache group ID.
  `pageId` - Page ID.
  `page` - Page pointer.
Returns:
  Pointer for reading the page.

#### readLockForce

    long readLockForce(int grpId,
                       long pageId,
                       long page)

Obtains read lock without checking page tag.

Parameters:
  `grpId` - Cache group ID.
  `pageId` - Page ID.
  `page` - Page pointer.
Returns:
  Pointer for reading the page.

#### readUnlock

    void readUnlock(int grpId,
                    long pageId,
                    long page)

Releases locked page.

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

#### writeLock

    long writeLock(int grpId,
                   long pageId,
                   long page)

Parameters:
  `grpId` - Cache group ID.
  `pageId` - Page ID.
  `page` - Page pointer.
Returns:
  Address of a buffer with contents of the given page or `0L` if attempt to take the write lock failed.

#### tryWriteLock

    long tryWriteLock(int grpId,
                      long pageId,
                      long page)

Parameters:
  `grpId` - Cache group ID.
  `pageId` - Page ID.
  `page` - Page pointer.
Returns:
  Address of a buffer with contents of the given page or `0L` if attempt to take the write lock failed.

#### writeUnlock

    void writeUnlock(int grpId,
                     long pageId,
                     long page,
                     Boolean walPlc,
                     boolean dirtyFlag)

Releases locked page.

Parameters:
  `grpId` - Cache group ID.
  `pageId` - Page ID.
  `page` - Page pointer.
  `walPlc` - `True` if page should be recorded to WAL, `false` if the page must not be recorded and `null` for the default behavior.
  `dirtyFlag` - Determines whether the page was modified since the last checkpoint.

#### isDirty

    boolean isDirty(int grpId,
                    long pageId,
                    long page)

Parameters:
  `grpId` - Cache group ID.
  `pageId` - Page ID.
  `page` - Page pointer.
Returns:
  `True` if the page is dirty.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.7.0
Release Date | : November 30 2018