org.apache.ignite.internal.pagemem.wal.record

## Class PageSnapshot

- java.lang.Object
- - org.apache.ignite.internal.pagemem.wal.record.WALRecord
  - - org.apache.ignite.internal.pagemem.wal.record.PageSnapshot

All Implemented Interfaces:
  WalRecordCacheGroupAware

    public class PageSnapshot
    extends WALRecord
    implements WalRecordCacheGroupAware

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.ignite.internal.pagemem.wal.record.WALRecord

`WALRecord.RecordPurpose, WALRecord.RecordType`

### Constructor Summary

Constructors
Constructor and Description
`PageSnapshot(FullPageId fullId, byte[] arr, int realPageSize)`
`PageSnapshot(FullPageId fullPageId, long ptr, int pageSize, int realPageSize)` This constructor doesn't actually create a page snapshot (copy), it creates a wrapper over page memory region.

### Method Summary

All Methods Instance Methods Concrete Methods
`FullPageId` `fullPageId()`
`int` `groupId()`
`byte[]` `pageData()`
`ByteBuffer` `pageDataBuffer()`
`int` `pageDataSize()`
`int` `realPageSize()`
`String` `toString()`
`WALRecord.RecordType` `type()`

### Methods inherited from class org.apache.ignite.internal.pagemem.wal.record.WALRecord

`chainSize, chainSize, position, position, previous, previous, size, size`

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

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

### Constructor Detail

#### PageSnapshot

    public PageSnapshot(FullPageId fullId,
                        byte[] arr,
                        int realPageSize)

Parameters:
  `fullId` - Full page ID.
  `arr` - Read array.
  `realPageSize` - Page size without encryption overhead.

#### PageSnapshot

    public PageSnapshot(FullPageId fullPageId,
                        long ptr,
                        int pageSize,
                        int realPageSize)

This constructor doesn't actually create a page snapshot (copy), it creates a wrapper over page memory region. A created record should not be used after WAL manager writes it to log, since page content can be modified.

Parameters:
  `fullPageId` - Full page ID.
  `ptr` - Pointer to wrap.
  `pageSize` - Page size.
  `realPageSize` - Page size without encryption overhead.

### Method Detail

#### type

    public WALRecord.RecordType type()

Specified by:
  `type` in class `WALRecord`
Returns:
  Entry type.

#### pageData

    public byte[] pageData()

Returns:
  Snapshot of page data.

#### pageDataSize

    public int pageDataSize()

Returns:
  Size of page data.

#### pageDataBuffer

    public ByteBuffer pageDataBuffer()

Returns:
  Page data byte buffer.

#### fullPageId

    public FullPageId fullPageId()

Returns:
  Full page ID.

#### groupId

    public int groupId()

Specified by:
  `groupId` in interface `WalRecordCacheGroupAware`
Returns:
  Cache group ID.

#### realPageSize

    public int realPageSize()

Returns:
  PageSize without encryption overhead.

#### toString

    public String toString()

Overrides:
  `toString` in class `WALRecord`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.11.1
Release Date | : December 20 2021