public abstract class PageLockTracker<T extends PageLockDump> extends Object implements PageLockListener, DumpSupported<T>
Modifier and Type | Field and Description |
---|---|
static int |
BEFORE_READ_LOCK
Page read before lock operation id.
|
static int |
BEFORE_WRITE_LOCK
Page write before lock operation id.
|
protected int |
heldLockCnt
Counter for track lock/unlock operations.
|
static int |
LOCK_IDX_MASK |
static int |
LOCK_OP_MASK |
protected String |
name |
protected int |
nextOp |
protected long |
nextOpPageId |
protected int |
nextOpStructureId |
static int |
OP_OFFSET |
protected PageMetaInfoStore |
pages |
static int |
READ_LOCK
Page read lock operation id.
|
static int |
READ_UNLOCK
Page read unlock operation id.
|
static int |
WRITE_LOCK
Page write lock operation id.
|
static int |
WRITE_UNLOCK
Page write unlock operation id.
|
Modifier | Constructor and Description |
---|---|
protected |
PageLockTracker(String name,
PageMetaInfoStore pages,
PageLockTrackerManager.MemoryCalculator memCalc) |
Modifier and Type | Method and Description |
---|---|
boolean |
acquireSafePoint() |
static String |
argsToString(int structureId,
long pageId,
int flags) |
T |
dump()
Create dump.
|
IgniteFuture<T> |
dumpSync()
Create dump async.
|
protected void |
free() |
int |
heldLocksNumber() |
protected void |
invalid(String msg) |
InvalidContext<T> |
invalidContext() |
boolean |
isInvalid() |
void |
onBeforeReadLock(int structureId,
long pageId,
long page) |
void |
onBeforeReadLock0(int structureId,
long pageId,
long page) |
void |
onBeforeWriteLock(int structureId,
long pageId,
long page) |
void |
onBeforeWriteLock0(int structureId,
long pageId,
long page) |
void |
onReadLock(int structureId,
long pageId,
long page,
long pageAddr) |
abstract void |
onReadLock0(int structureId,
long pageId,
long page,
long pageAddr) |
void |
onReadUnlock(int structureId,
long pageId,
long page,
long pageAddr) |
abstract void |
onReadUnlock0(int structureId,
long pageId,
long page,
long pageAddr) |
void |
onWriteLock(int structureId,
long pageId,
long page,
long pageAddr) |
abstract void |
onWriteLock0(int structureId,
long pageId,
long page,
long pageAddr) |
void |
onWriteUnlock(int structureId,
long pageId,
long page,
long pageAddr) |
abstract void |
onWriteUnlock0(int structureId,
long pageId,
long page,
long pageAddr) |
long |
operationsCounter() |
static String |
pageIdToString(long pageId) |
boolean |
releaseSafePoint() |
protected abstract T |
snapshot() |
protected boolean |
validateOperation(int structureId,
long pageId,
int op) |
public static final int OP_OFFSET
public static final int LOCK_IDX_MASK
public static final int LOCK_OP_MASK
public static final int READ_LOCK
public static final int READ_UNLOCK
public static final int WRITE_LOCK
public static final int WRITE_UNLOCK
public static final int BEFORE_READ_LOCK
public static final int BEFORE_WRITE_LOCK
protected final String name
protected final PageMetaInfoStore pages
protected int heldLockCnt
protected int nextOp
protected int nextOpStructureId
protected long nextOpPageId
protected PageLockTracker(String name, PageMetaInfoStore pages, PageLockTrackerManager.MemoryCalculator memCalc)
public void onBeforeWriteLock0(int structureId, long pageId, long page)
public void onBeforeReadLock0(int structureId, long pageId, long page)
public void onBeforeWriteLock(int structureId, long pageId, long page)
onBeforeWriteLock
in interface PageLockListener
structureId
- Cache ID.pageId
- Page ID.page
- Page pointer.public void onWriteLock(int structureId, long pageId, long page, long pageAddr)
onWriteLock
in interface PageLockListener
structureId
- Cache ID.pageId
- Page ID.page
- Page pointer.pageAddr
- Page address.public void onWriteUnlock(int structureId, long pageId, long page, long pageAddr)
onWriteUnlock
in interface PageLockListener
structureId
- Cache ID.pageId
- Page ID.page
- Page pointer.pageAddr
- Page address.public void onBeforeReadLock(int structureId, long pageId, long page)
onBeforeReadLock
in interface PageLockListener
structureId
- Cache ID.pageId
- Page ID.page
- Page pointer.public void onReadLock(int structureId, long pageId, long page, long pageAddr)
onReadLock
in interface PageLockListener
structureId
- Cache ID.pageId
- Page ID.page
- Page pointer.pageAddr
- Page address.public void onReadUnlock(int structureId, long pageId, long page, long pageAddr)
onReadUnlock
in interface PageLockListener
structureId
- Cache ID.pageId
- Page ID.page
- Page pointer.pageAddr
- Page address.public abstract void onWriteLock0(int structureId, long pageId, long page, long pageAddr)
public abstract void onWriteUnlock0(int structureId, long pageId, long page, long pageAddr)
public abstract void onReadLock0(int structureId, long pageId, long page, long pageAddr)
public abstract void onReadUnlock0(int structureId, long pageId, long page, long pageAddr)
public boolean isInvalid()
public InvalidContext<T> invalidContext()
protected void free()
protected void invalid(String msg)
public long operationsCounter()
public int heldLocksNumber()
protected boolean validateOperation(int structureId, long pageId, int op)
protected abstract T snapshot()
public boolean acquireSafePoint()
acquireSafePoint
in interface DumpSupported<T extends PageLockDump>
public boolean releaseSafePoint()
releaseSafePoint
in interface DumpSupported<T extends PageLockDump>
public T dump()
dump
in interface DumpSupported<T extends PageLockDump>
public IgniteFuture<T> dumpSync()
dumpSync
in interface DumpSupported<T extends PageLockDump>
public static String argsToString(int structureId, long pageId, int flags)
public static String pageIdToString(long pageId)
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.10.0 Release Date : March 10 2021