|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.lmu.ifi.dbs.elki.persistent.AbstractPageFile<P> de.lmu.ifi.dbs.elki.persistent.AbstractStoringPageFile<P>
P
- Page typepublic abstract class AbstractStoringPageFile<P extends Page>
Abstract class implementing general methods of a PageFile. A PageFile stores
objects that implement the Page
interface.
Field Summary | |
---|---|
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. |
Fields inherited from class de.lmu.ifi.dbs.elki.persistent.AbstractPageFile |
---|
readAccess, writeAccess |
Constructor Summary | |
---|---|
protected |
AbstractStoringPageFile(int pageSize)
Creates a new PageFile. |
Method Summary | |
---|---|
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. |
Methods inherited from class de.lmu.ifi.dbs.elki.persistent.AbstractPageFile |
---|
close, getReadOperations, getWriteOperations, resetPageAccess, writePage, writePage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.persistent.PageFile |
---|
clear, readPage |
Field Detail |
---|
protected Stack<Integer> emptyPages
protected int nextPageID
protected int pageSize
Constructor Detail |
---|
protected AbstractStoringPageFile(int pageSize)
Method Detail |
---|
public Integer setPageID(P page)
page
- the page to set the id
public 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
- Header
public PageFileStatistics getInnerStatistics()
PageFileStatistics
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |