public abstract class PageHandler<X,R> extends Object
| Constructor and Description |
|---|
PageHandler() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyMemory(ByteBuffer src,
long srcOff,
ByteBuffer dst,
long dstOff,
long cnt) |
static void |
copyMemory(long srcAddr,
long srcOff,
long dstAddr,
long dstOff,
long cnt) |
static void |
initPage(PageMemory pageMem,
int grpId,
long pageId,
PageIO init,
IgniteWriteAheadLogManager wal,
PageLockListener lsnr,
IoStatisticsHolder statHolder) |
static boolean |
isWalDeltaRecordNeeded(PageSupport pageMem,
int cacheId,
long pageId,
long page,
IgniteWriteAheadLogManager wal,
@Nullable Boolean walPlc) |
static long |
readLock(PageMemory pageMem,
int cacheId,
long pageId,
long page,
PageLockListener lsnr) |
static <X,R> R |
readPage(PageMemory pageMem,
int cacheId,
long pageId,
long page,
PageLockListener lsnr,
PageHandler<X,R> h,
X arg,
int intArg,
R lockFailed,
IoStatisticsHolder statHolder) |
static <X,R> R |
readPage(PageMemory pageMem,
int cacheId,
long pageId,
PageLockListener lsnr,
PageHandler<X,R> h,
X arg,
int intArg,
R lockFailed,
IoStatisticsHolder statHolder) |
static void |
readUnlock(PageMemory pageMem,
int cacheId,
long pageId,
long page,
long pageAddr,
PageLockListener lsnr) |
boolean |
releaseAfterWrite(int cacheId,
long pageId,
long page,
long pageAddr,
X arg,
int intArg) |
abstract R |
run(int cacheId,
long pageId,
long page,
long pageAddr,
PageIO io,
Boolean walPlc,
X arg,
int intArg,
IoStatisticsHolder statHolder) |
static long |
writeLock(PageMemory pageMem,
int cacheId,
long pageId,
long page,
PageLockListener lsnr,
boolean tryLock) |
static <X,R> R |
writePage(PageMemory pageMem,
int grpId,
long pageId,
long page,
PageLockListener lsnr,
PageHandler<X,R> h,
PageIO init,
IgniteWriteAheadLogManager wal,
Boolean walPlc,
X arg,
int intArg,
R lockFailed,
IoStatisticsHolder statHolder) |
static <X,R> R |
writePage(PageMemory pageMem,
int grpId,
long pageId,
PageLockListener lsnr,
PageHandler<X,R> h,
PageIO init,
IgniteWriteAheadLogManager wal,
Boolean walPlc,
X arg,
int intArg,
R lockFailed,
IoStatisticsHolder statHolder) |
static void |
writeUnlock(PageMemory pageMem,
int cacheId,
long pageId,
long page,
long pageAddr,
PageLockListener lsnr,
Boolean walPlc,
boolean dirty) |
static void |
zeroMemory(ByteBuffer buf,
int off,
int len)
Will zero memory in buf
|
static void |
zeroMemory(long addr,
int off,
int len) |
public abstract R run(int cacheId, long pageId, long page, long pageAddr, PageIO io, Boolean walPlc, X arg, int intArg, IoStatisticsHolder statHolder) throws IgniteCheckedException
cacheId - Cache ID.pageId - Page ID.page - Page absolute pointer.pageAddr - Page address.io - IO.walPlc - Full page WAL record policy.arg - Argument.intArg - Argument of type int.statHolder - Statistics holder to track IO operations.IgniteCheckedException - If failed.public boolean releaseAfterWrite(int cacheId,
long pageId,
long page,
long pageAddr,
X arg,
int intArg)
cacheId - Cache ID.pageId - Page ID.page - Page pointer.pageAddr - Page address.arg - Argument.intArg - Argument of type int.true If release.public static <X,R> R readPage(PageMemory pageMem, int cacheId, long pageId, PageLockListener lsnr, PageHandler<X,R> h, X arg, int intArg, R lockFailed, IoStatisticsHolder statHolder) throws IgniteCheckedException
pageMem - Page memory.cacheId - Cache ID.pageId - Page ID.lsnr - Lock listener.h - Handler.arg - Argument.intArg - Argument of type int.lockFailed - Result in case of lock failure due to page recycling.statHolder - Statistics holder to track IO operations.IgniteCheckedException - If failed.public static <X,R> R readPage(PageMemory pageMem, int cacheId, long pageId, long page, PageLockListener lsnr, PageHandler<X,R> h, X arg, int intArg, R lockFailed, IoStatisticsHolder statHolder) throws IgniteCheckedException
pageMem - Page memory.cacheId - Cache ID.pageId - Page ID.page - Page pointer.lsnr - Lock listener.h - Handler.arg - Argument.intArg - Argument of type int.lockFailed - Result in case of lock failure due to page recycling.statHolder - Statistics holder to track IO operations.IgniteCheckedException - If failed.public static long readLock(PageMemory pageMem, int cacheId, long pageId, long page, PageLockListener lsnr)
pageMem - Page memory.cacheId - Cache ID.pageId - Page ID.page - Page pointer.lsnr - Lock listener.public static void readUnlock(PageMemory pageMem, int cacheId, long pageId, long page, long pageAddr, PageLockListener lsnr)
pageMem - Page memory.cacheId - Cache ID.pageId - Page ID.page - Page pointer.pageAddr - Page address (for-write pointer)lsnr - Lock listener.public static void initPage(PageMemory pageMem, int grpId, long pageId, PageIO init, IgniteWriteAheadLogManager wal, PageLockListener lsnr, IoStatisticsHolder statHolder) throws IgniteCheckedException
pageMem - Page memory.grpId - Group ID.pageId - Page ID.init - IO for new page initialization.wal - Write ahead log.lsnr - Lock listener.statHolder - Statistics holder to track IO operations.IgniteCheckedException - If failed.public static <X,R> R writePage(PageMemory pageMem, int grpId, long pageId, PageLockListener lsnr, PageHandler<X,R> h, PageIO init, IgniteWriteAheadLogManager wal, Boolean walPlc, X arg, int intArg, R lockFailed, IoStatisticsHolder statHolder) throws IgniteCheckedException
pageMem - Page memory.grpId - Group ID.pageId - Page ID.lsnr - Lock listener.h - Handler.init - IO for new page initialization or null if it is an existing page.wal - Write ahead log.walPlc - Full page WAL record policy.arg - Argument.intArg - Argument of type int.lockFailed - Result in case of lock failure due to page recycling.statHolder - Statistics holder to track IO operations.IgniteCheckedException - If failed.public static <X,R> R writePage(PageMemory pageMem, int grpId, long pageId, long page, PageLockListener lsnr, PageHandler<X,R> h, PageIO init, IgniteWriteAheadLogManager wal, Boolean walPlc, X arg, int intArg, R lockFailed, IoStatisticsHolder statHolder) throws IgniteCheckedException
pageMem - Page memory.grpId - Group ID.pageId - Page ID.page - Page pointer.lsnr - Lock listener.h - Handler.init - IO for new page initialization or null if it is an existing page.wal - Write ahead log.walPlc - Full page WAL record policy.arg - Argument.intArg - Argument of type int.lockFailed - Result in case of lock failure due to page recycling.statHolder - Statistics holder to track IO operations.IgniteCheckedException - If failed.public static void writeUnlock(PageMemory pageMem, int cacheId, long pageId, long page, long pageAddr, PageLockListener lsnr, Boolean walPlc, boolean dirty)
pageMem - Page memory.cacheId - Cache ID.pageId - Page ID.page - Page pointer.pageAddr - Page address.lsnr - Lock listener.walPlc - Full page WAL record policy.dirty - Page is dirty.public static long writeLock(PageMemory pageMem, int cacheId, long pageId, long page, PageLockListener lsnr, boolean tryLock)
pageMem - Page memory.cacheId - Cache ID.pageId - Page ID.page - Page pointer.lsnr - Lock listener.tryLock - Only try to lock without waiting.0 if failed to lock due to recycling.public static boolean isWalDeltaRecordNeeded(PageSupport pageMem, int cacheId, long pageId, long page, IgniteWriteAheadLogManager wal, @Nullable @Nullable Boolean walPlc)
pageMem - Page memory.cacheId - Cache ID.pageId - Page ID.page - Page pointer.wal - Write ahead log.walPlc - Full page WAL record policy.true If we need to make a delta WAL record for the change in this page.public static void copyMemory(ByteBuffer src, long srcOff, ByteBuffer dst, long dstOff, long cnt)
src - Source.srcOff - Source offset in bytes.dst - Destination.dstOff - Destination offset in bytes.cnt - Bytes count to copy.public static void zeroMemory(ByteBuffer buf, int off, int len)
buf - Buffer.off - Offset.len - Length.public static void copyMemory(long srcAddr,
long srcOff,
long dstAddr,
long dstOff,
long cnt)
srcAddr - Source.srcOff - Source offset in bytes.dstAddr - Destination.dstOff - Destination offset in bytes.cnt - Bytes count to copy.public static void zeroMemory(long addr,
int off,
int len)
addr - Address.off - Offset.len - Length.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.8.1 Release Date : May 21 2020