|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.metanotion.io.block.FreeListBlock
class FreeListBlock
On-disk format:
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)
Field Summary | |
---|---|
int |
page
|
Constructor Summary | |
---|---|
FreeListBlock(RandomAccessInterface file,
int startPage)
|
Method Summary | |
---|---|
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 |
String |
toString()
|
void |
writeBlock()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final int page
Constructor Detail |
---|
public FreeListBlock(RandomAccessInterface file, int startPage) throws IOException
IOException
Method Detail |
---|
public void writeBlock() throws IOException
IOException
public int getNextPage()
public void setNextPage(int nxt) throws IOException
IOException
public boolean isEmpty()
public boolean isFull()
public void addPage(int freePage) throws IOException
IllegalStateException
- if full
IOException
public int takePage() throws IOException
IllegalStateException
- if empty
IOException
public static void initPage(RandomAccessInterface file, int page) throws IOException
IOException
public boolean flbck(boolean fix) throws IOException
IOException
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |