public abstract class PageHandler<X,R> extends Object
Constructor and Description |
---|
PageHandler() |
Modifier and Type | Method and Description |
---|---|
static void |
copyMemory(ByteBuffer src,
ByteBuffer dst,
long srcOff,
long dstOff,
long cnt) |
static void |
copyMemory(long srcAddr,
long dstAddr,
long srcOff,
long dstOff,
long cnt) |
static void |
initPage(PageMemory pageMem,
int cacheId,
long pageId,
PageIO init,
IgniteWriteAheadLogManager wal,
PageLockListener lsnr) |
static boolean |
isWalDeltaRecordNeeded(PageMemory pageMem,
int cacheId,
long pageId,
long page,
IgniteWriteAheadLogManager wal,
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) |
static <X,R> R |
readPage(PageMemory pageMem,
int cacheId,
long pageId,
PageLockListener lsnr,
PageHandler<X,R> h,
X arg,
int intArg,
R lockFailed) |
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) |
static long |
writeLock(PageMemory pageMem,
int cacheId,
long pageId,
long page,
PageLockListener lsnr,
boolean tryLock) |
static <X,R> R |
writePage(PageMemory pageMem,
int cacheId,
long pageId,
long page,
PageLockListener lsnr,
PageHandler<X,R> h,
PageIO init,
IgniteWriteAheadLogManager wal,
Boolean walPlc,
X arg,
int intArg,
R lockFailed) |
static <X,R> R |
writePage(PageMemory pageMem,
int cacheId,
long pageId,
PageLockListener lsnr,
PageHandler<X,R> h,
PageIO init,
IgniteWriteAheadLogManager wal,
Boolean walPlc,
X arg,
int intArg,
R lockFailed) |
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) 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
.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) 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.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) 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.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 cacheId, long pageId, PageIO init, IgniteWriteAheadLogManager wal, PageLockListener lsnr) throws IgniteCheckedException
pageMem
- Page memory.cacheId
- Cache ID.pageId
- Page ID.init
- IO for new page initialization.wal
- Write ahead log.lsnr
- Lock listener.IgniteCheckedException
- If failed.public static <X,R> R writePage(PageMemory pageMem, int cacheId, long pageId, PageLockListener lsnr, PageHandler<X,R> h, PageIO init, IgniteWriteAheadLogManager wal, Boolean walPlc, X arg, int intArg, R lockFailed) throws IgniteCheckedException
pageMem
- Page memory.cacheId
- Cache 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.IgniteCheckedException
- If failed.public static <X,R> R writePage(PageMemory pageMem, int cacheId, long pageId, long page, PageLockListener lsnr, PageHandler<X,R> h, PageIO init, IgniteWriteAheadLogManager wal, Boolean walPlc, X arg, int intArg, R lockFailed) throws IgniteCheckedException
pageMem
- Page memory.cacheId
- Cache 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.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(PageMemory pageMem, int cacheId, long pageId, long page, IgniteWriteAheadLogManager wal, 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, ByteBuffer dst, long srcOff, long dstOff, long cnt)
src
- Source.dst
- Destination.srcOff
- Source offset in bytes.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 dstAddr, long srcOff, long dstOff, long cnt)
srcAddr
- Source.dstAddr
- Destination.srcOff
- Source offset in bytes.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 Fabric : ver. 2.0.0 Release Date : April 30 2017