Interface PageSupport
-
- All Known Subinterfaces:
PageMemory,PageMemoryEx
- All Known Implementing Classes:
PageMemoryImpl,PageMemoryNoStoreImpl
public interface PageSupportSupports operations on pages.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longacquirePage(int grpId, long pageId)Gets the page absolute pointer associated with the given page ID.longacquirePage(int grpId, long pageId, IoStatisticsHolder statHolder)Gets the page absolute pointer associated with the given page ID.booleanisDirty(int grpId, long pageId, long page)longreadLock(int grpId, long pageId, long page)longreadLockForce(int grpId, long pageId, long page)Obtains read lock without checking page tag.voidreadUnlock(int grpId, long pageId, long page)Releases locked page.voidreleasePage(int grpId, long pageId, long page)longtryWriteLock(int grpId, long pageId, long page)longwriteLock(int grpId, long pageId, long page)voidwriteUnlock(int grpId, long pageId, long page, Boolean walPlc, boolean dirtyFlag)Releases locked page.
-
-
-
Method Detail
-
acquirePage
long acquirePage(int grpId, long pageId) throws IgniteCheckedExceptionGets the page absolute pointer associated with the given page ID. Each page obtained with this method must be released by callingreleasePage(int, long, long). This method will allocate page with given ID if it doesn't exist.- Parameters:
grpId- Cache group ID.pageId- Page ID.- Returns:
- Page pointer.
- Throws:
IgniteCheckedException- If failed.
-
acquirePage
long acquirePage(int grpId, long pageId, IoStatisticsHolder statHolder) throws IgniteCheckedExceptionGets the page absolute pointer associated with the given page ID. Each page obtained with this method must be released by callingreleasePage(int, long, long). This method will allocate page with given ID if it doesn't exist.- Parameters:
grpId- Cache group ID.pageId- Page ID.statHolder- Statistics holder to track IO operations.- Returns:
- Page pointer.
- Throws:
IgniteCheckedException- If failed.
-
releasePage
void releasePage(int grpId, long pageId, long page)- Parameters:
grpId- Cache group ID.pageId- Page ID to release.page- Page pointer.
-
readLock
long readLock(int grpId, long pageId, long page)- Parameters:
grpId- Cache group ID.pageId- Page ID.page- Page pointer.- Returns:
- Pointer for reading the page.
-
readLockForce
long readLockForce(int grpId, long pageId, long page)Obtains read lock without checking page tag.- Parameters:
grpId- Cache group ID.pageId- Page ID.page- Page pointer.- Returns:
- Pointer for reading the page.
-
readUnlock
void readUnlock(int grpId, long pageId, long page)Releases locked page.- Parameters:
grpId- Cache group ID.pageId- Page ID.page- Page pointer.
-
writeLock
long writeLock(int grpId, long pageId, long page)- Parameters:
grpId- Cache group ID.pageId- Page ID.page- Page pointer.- Returns:
- Address of a buffer with contents of the given page or
0Lif attempt to take the write lock failed.
-
tryWriteLock
long tryWriteLock(int grpId, long pageId, long page)- Parameters:
grpId- Cache group ID.pageId- Page ID.page- Page pointer.- Returns:
- Address of a buffer with contents of the given page or
0Lif attempt to take the write lock failed.
-
writeUnlock
void writeUnlock(int grpId, long pageId, long page, Boolean walPlc, boolean dirtyFlag)Releases locked page.- Parameters:
grpId- Cache group ID.pageId- Page ID.page- Page pointer.walPlc-Trueif page should be recorded to WAL,falseif the page must not be recorded andnullfor the default behavior.dirtyFlag- Determines whether the page was modified since the last checkpoint.
-
isDirty
boolean isDirty(int grpId, long pageId, long page)- Parameters:
grpId- Cache group ID.pageId- Page ID.page- Page pointer.- Returns:
Trueif the page is dirty.
-
-