class FreeListBlock
extends java.lang.Object
Magic number (long) next freelist block page (unsigned int) size (unsigned int) that many free pages (unsigned ints)Always fits on one page. Free page format:
Magic number (long)
修飾子とタイプ | フィールド | 説明 |
---|---|---|
int |
page |
コンストラクタ | 説明 |
---|---|
FreeListBlock(RandomAccessInterface file,
int startPage) |
修飾子とタイプ | メソッド | 説明 |
---|---|---|
void |
addPage(int freePage) |
Adds free page and writes new len to disk
|
boolean |
flbck(boolean fix) |
Recursive.
|
int |
getNextPage() |
|
static void |
initPage(RandomAccessInterface file,
int page) |
|
boolean |
isEmpty() |
|
boolean |
isFull() |
|
void |
setNextPage(int nxt) |
Set and write the next page only
|
int |
takePage() |
Takes next page and writes new len to disk
|
java.lang.String |
toString() |
|
void |
writeBlock() |
public FreeListBlock(RandomAccessInterface file, int startPage) throws java.io.IOException
java.io.IOException
public void writeBlock() throws java.io.IOException
java.io.IOException
public int getNextPage()
public void setNextPage(int nxt) throws java.io.IOException
java.io.IOException
public boolean isEmpty()
public boolean isFull()
public void addPage(int freePage) throws java.io.IOException
java.lang.IllegalStateException
- if fulljava.io.IOException
public int takePage() throws java.io.IOException
java.lang.IllegalStateException
- if emptyjava.io.IOException
public static void initPage(RandomAccessInterface file, int page) throws java.io.IOException
java.io.IOException
public boolean flbck(boolean fix) throws java.io.IOException
java.io.IOException
public java.lang.String toString()
toString
クラス内 java.lang.Object