|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.h2.test.store.FreeSpaceTree
public class FreeSpaceTree
A list that maintains ranges of free space (in blocks) in a file.
Constructor Summary | |
---|---|
FreeSpaceTree(int firstFreeBlock,
int blockSize)
|
Method Summary | |
---|---|
long |
allocate(int length)
Allocate a number of blocks and mark them as used. |
void |
clear()
Reset the list. |
void |
free(long pos,
int length)
Mark the space as free. |
void |
markUsed(long pos,
int length)
Mark the space as in use. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FreeSpaceTree(int firstFreeBlock, int blockSize)
Method Detail |
---|
public void clear()
public long allocate(int length)
length
- the number of bytes to allocate
public void markUsed(long pos, int length)
pos
- the position in byteslength
- the number of bytespublic void free(long pos, int length)
pos
- the position in byteslength
- the number of bytespublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |