P
- Page typepublic abstract class AbstractStoringPageFile<P extends Page> extends AbstractPageFile<P>
Page
interface.Modifier and Type | Field and Description |
---|---|
protected Stack<Integer> |
emptyPages
A stack holding the empty page ids.
|
protected int |
nextPageID
The last page ID.
|
protected int |
pageSize
The size of a page in Bytes.
|
readAccess, writeAccess
Modifier | Constructor and Description |
---|---|
protected |
AbstractStoringPageFile(int pageSize)
Creates a new PageFile.
|
Modifier and Type | Method and Description |
---|---|
void |
deletePage(int pageID)
Deletes the node with the specified id from this file.
|
PageFileStatistics |
getInnerStatistics()
Get statistics for the inner page file, if present.
|
private Integer |
getNextEmptyPageID()
Returns the next empty page id.
|
int |
getNextPageID()
Returns the next page id.
|
int |
getPageSize()
Get the page size of this page file.
|
boolean |
initialize(PageHeader header)
Initialize the page file with the given header - return "true" if the file
already existed.
|
void |
setNextPageID(int nextPageID)
Sets the next page id.
|
Integer |
setPageID(P page)
Sets the id of the given page.
|
close, getReadOperations, getWriteOperations, resetPageAccess, writePage, writePage
protected int nextPageID
protected int pageSize
protected AbstractStoringPageFile(int pageSize)
public Integer setPageID(P page)
page
- the page to set the idpublic void deletePage(int pageID)
pageID
- the id of the node to be deletedprivate Integer getNextEmptyPageID()
public int getNextPageID()
public void setNextPageID(int nextPageID)
nextPageID
- the next page id to be setpublic int getPageSize()
public boolean initialize(PageHeader header)
header
- Headerpublic PageFileStatistics getInnerStatistics()
PageFileStatistics