P
- Page typepublic abstract class AbstractStoringPageFile<P extends Page> extends AbstractPageFile<P>
Page
interface.Modifier and Type | Field and Description |
---|---|
protected java.util.Stack<java.lang.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.
|
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.
|
private int |
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 |
logStatistics()
Log some statistics to the appropriate logger.
|
void |
setNextPageID(int nextPageID)
Sets the next page id.
|
int |
setPageID(P page)
Sets the id of the given page.
|
close, countRead, countWrite, getLogger, writePage, writePage
protected java.util.Stack<java.lang.Integer> emptyPages
protected int nextPageID
protected int pageSize
protected AbstractStoringPageFile(int pageSize)
public int setPageID(P page)
page
- the page to set the idpublic void deletePage(int pageID)
pageID
- the id of the node to be deletedprivate int 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 void logStatistics()
PageFile
logStatistics
in interface PageFile<P extends Page>
logStatistics
in class AbstractPageFile<P extends Page>
Copyright © 2019 ELKI Development Team. License information.