
public class MkTreeHeader extends TreeIndexHeader
AbstractMkTreeUnified.
 This information is needed for persistent storage.| Modifier and Type | Field and Description | 
|---|---|
| private int | k_maxThe maximum number k of reverse kNN queries to be supported. | 
| private static int | SIZEThe size of this header in Bytes,
 which is 4 Bytes (for  k_max). | 
| Constructor and Description | 
|---|
| MkTreeHeader()Empty constructor for serialization. | 
| MkTreeHeader(int pageSize,
            int dirCapacity,
            int leafCapacity,
            int k_max)Creates a nerw header with the specified parameters. | 
| Modifier and Type | Method and Description | 
|---|---|
| int | getK_max()Returns the parameter k. | 
| void | readHeader(RandomAccessFile file)Initializes this header from the specified file. | 
| int | size()Returns  TreeIndexHeader.size()plus the value ofSIZE). | 
| void | writeHeader(RandomAccessFile file)Writes this header to the specified file. | 
getDirCapacity, getDirMinimum, getEmptyPagesSize, getLargestPageID, getLeafCapacity, getLeafMinimum, readEmptyPages, setEmptyPagesSize, setLargestPageID, writeEmptyPagesasByteArray, getPageSize, getReservedPages, readHeaderprivate static int SIZE
k_max).private int k_max
public MkTreeHeader()
public MkTreeHeader(int pageSize,
            int dirCapacity,
            int leafCapacity,
            int k_max)
pageSize - the size of a page in bytesdirCapacity - the capacity of a directory nodeleafCapacity - the capacity of a leaf nodek_max - the parameter kpublic void readHeader(RandomAccessFile file) throws IOException
TreeIndexHeader#readHeader(file) and reads additionally the integer value of
 k_max
 from the file.readHeader in interface PageHeaderreadHeader in class TreeIndexHeaderfile - the file to which this header belongsIOException - if an I/O-error occurs during readingpublic void writeHeader(RandomAccessFile file) throws IOException
TreeIndexHeader.writeHeader(java.io.RandomAccessFile)
 and writes additionally the integer value of
 k_max
 to the file.writeHeader in interface PageHeaderwriteHeader in class TreeIndexHeaderfile - the file to which this header belongsIOException - IOException if an I/O-error occurs during writingpublic int getK_max()
public int size()
TreeIndexHeader.size()
 plus the value of SIZE).size in interface PageHeadersize in class TreeIndexHeader