|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.persistent.DefaultPageHeader
de.lmu.ifi.dbs.elki.index.tree.TreeIndexHeader
public class TreeIndexHeader
Encapsulates the header information of a tree like index structure. This information is needed for persistent storage.
Field Summary | |
---|---|
(package private) int |
dirCapacity
The capacity of a directory node (= 1 + maximum number of entries in a directory node). |
(package private) int |
dirMinimum
The minimum number of entries in a directory node. |
(package private) int |
leafCapacity
The capacity of a leaf node (= 1 + maximum number of entries in a leaf node). |
(package private) int |
leafMinimum
The minimum number of entries in a leaf node. |
private static int |
SIZE
The size of this header in Bytes, which is 16 Bytes ( 4 Bytes for dirCapacity , leafCapacity , dirMinimum , and
leafMinimum ). |
Constructor Summary | |
---|---|
TreeIndexHeader()
Empty constructor for serialization. |
|
TreeIndexHeader(int pageSize,
int dirCapacity,
int leafCapacity,
int dirMinimum,
int leafMinimum)
Creates a new header with the specified parameters. |
Method Summary | |
---|---|
int |
getDirCapacity()
Returns the capacity of a directory node (= 1 + maximum number of entries in a directory node). |
int |
getDirMinimum()
Returns the minimum number of entries in a directory node. |
int |
getLeafCapacity()
Returns the capacity of a leaf node (= 1 + maximum number of entries in a leaf node). |
int |
getLeafMinimum()
Returns the minimum number of entries in a leaf node. |
void |
readHeader(RandomAccessFile file)
Initializes this header from the specified file. |
int |
size()
Returns DefaultPageHeader.size()
plus the value of SIZE ). |
void |
writeHeader(RandomAccessFile file)
Writes this header to the specified file. |
Methods inherited from class de.lmu.ifi.dbs.elki.persistent.DefaultPageHeader |
---|
asByteArray, getPageSize, readHeader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static int SIZE
dirCapacity
, leafCapacity
, dirMinimum
, and
leafMinimum
).
int dirCapacity
int leafCapacity
int dirMinimum
int leafMinimum
Constructor Detail |
---|
public TreeIndexHeader()
public TreeIndexHeader(int pageSize, int dirCapacity, int leafCapacity, int dirMinimum, int leafMinimum)
pageSize
- the size of a page in bytesdirCapacity
- the maximum number of entries in a directory nodeleafCapacity
- the maximum number of entries in a leaf nodedirMinimum
- the minimum number of entries in a directory nodeleafMinimum
- the minimum number of entries in a leaf nodeMethod Detail |
---|
public void readHeader(RandomAccessFile file) throws IOException
DefaultPageHeader#readHeader(file)
and reads the integer values of
dirCapacity
, leafCapacity
, dirMinimum
, and
leafMinimum
from the file.
readHeader
in interface PageHeader
readHeader
in class DefaultPageHeader
file
- the file to which this header belongs
IOException
- if an I/O-error occurs during readingpublic void writeHeader(RandomAccessFile file) throws IOException
dirCapacity
, leafCapacity
, dirMinimum
, and
leafMinimum
to the file.
writeHeader
in interface PageHeader
writeHeader
in class DefaultPageHeader
file
- the file to which this header belongs
IOException
- IOException if an I/O-error occurs during writingpublic int getDirCapacity()
public int getLeafCapacity()
public int getDirMinimum()
public int getLeafMinimum()
public int size()
DefaultPageHeader.size()
plus the value of SIZE
).
size
in interface PageHeader
size
in class DefaultPageHeader
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |