P
- Page typepublic class MemoryPageFile<P extends Page> extends AbstractStoringPageFile<P>
Modifier and Type | Field and Description |
---|---|
private gnu.trove.map.TIntObjectMap<P> |
file
Holds the pages.
|
private static Logging |
LOG
Class logger.
|
emptyPages, nextPageID, pageSize
Constructor and Description |
---|
MemoryPageFile(int pageSize)
Creates a new MemoryPageFile that is supported by a cache with the
specified parameters.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears this PageFile.
|
void |
deletePage(int pageID)
Deletes the node with the specified id from this file.
|
protected Logging |
getLogger()
Get the class logger.
|
P |
readPage(int pageID)
Reads the page with the given id from this file.
|
protected void |
writePage(int pageID,
P page)
Perform the actual page write operation.
|
getNextPageID, getPageSize, initialize, logStatistics, setNextPageID, setPageID
close, countRead, countWrite, writePage
private static final Logging LOG
public MemoryPageFile(int pageSize)
pageSize
- the size of a page in Bytespublic P readPage(int pageID)
PageFile
pageID
- the id of the page to be returnedprotected void writePage(int pageID, P page)
AbstractPageFile
writePage
in class AbstractPageFile<P extends Page>
pageID
- Page idpage
- Page to writepublic void deletePage(int pageID)
AbstractStoringPageFile
deletePage
in interface PageFile<P extends Page>
deletePage
in class AbstractStoringPageFile<P extends Page>
pageID
- the id of the node to be deletedpublic void clear()
PageFile
protected Logging getLogger()
AbstractPageFile
getLogger
in class AbstractPageFile<P extends Page>