public final class TempPageHolder extends Object
Modifier and Type | Method and Description |
---|---|
void |
clear()
Forces any current page data to be disregarded (any
getPage /setPage call must reload page data) and
releases any referenced memory. |
ByteBuffer |
getPage(PageChannel pageChannel) |
int |
getPageNumber() |
void |
invalidate()
Forces any current page data to be disregarded (any
getPage /setPage call must reload page data). |
static TempPageHolder |
newHolder(TempBufferHolder.Type type)
Creates a new TempPageHolder.
|
void |
possiblyInvalidate(int modifiedPageNumber,
ByteBuffer modifiedBuffer)
Forces any current page data to be disregarded if it matches the given
page number (any
getPage /setPage call must
reload page data) and is not the given buffer. |
ByteBuffer |
setNewPage(PageChannel pageChannel)
Allocates a new buffer in the database (with undefined data) and returns
a new empty buffer.
|
ByteBuffer |
setPage(PageChannel pageChannel,
int pageNumber)
Sets the current page number and returns that page
|
public static TempPageHolder newHolder(TempBufferHolder.Type type)
type
- the type of reference desired for any create page bufferspublic int getPageNumber()
public ByteBuffer getPage(PageChannel pageChannel) throws IOException
IOException
public ByteBuffer setPage(PageChannel pageChannel, int pageNumber) throws IOException
IOException
public ByteBuffer setNewPage(PageChannel pageChannel) throws IOException
IOException
public void invalidate()
getPage
/setPage
call must reload page data).
Does not necessarily release any memory.public void possiblyInvalidate(int modifiedPageNumber, ByteBuffer modifiedBuffer)
getPage
/setPage
call must
reload page data) and is not the given buffer. Does not necessarily
release any memory.public void clear()
getPage
/setPage
call must reload page data) and
releases any referenced memory.Copyright © 2005–2024 OpenHMS. All rights reserved.