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 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 Modifier and Type Method Description FullPageIdfullPageId()intgroupId()byte[]pageData()ByteBufferpageDataBuffer()intpageDataSize()intrealPageSize()StringtoString()WALRecord.RecordTypetype()
-
-
-
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()
-
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:
groupIdin interfaceWalRecordCacheGroupAware- Returns:
- Cache group ID.
-
realPageSize
public int realPageSize()
- Returns:
- PageSize without encryption overhead.
-
-