|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.mvstore.FreeSpaceBitSet
public class FreeSpaceBitSet
A free space bit set.
| Constructor Summary | |
|---|---|
FreeSpaceBitSet(int firstFreeBlock,
int blockSize)
Create a new free space map. |
|
| 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. |
int |
getFillRate()
Get the fill rate of the space in percent. |
long |
getFirstFree()
Get the position of the first free space. |
boolean |
isFree(long pos,
int length)
Check whether one of the blocks is free. |
boolean |
isUsed(long pos,
int length)
Check whether one of the blocks is in use. |
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 FreeSpaceBitSet(int firstFreeBlock,
int blockSize)
firstFreeBlock - the first free blockblockSize - the block size| Method Detail |
|---|
public void clear()
public boolean isUsed(long pos,
int length)
pos - the position in byteslength - the number of bytes
public boolean isFree(long pos,
int length)
pos - the position in byteslength - the number of bytes
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 bytes
public void free(long pos,
int length)
pos - the position in byteslength - the number of bytespublic int getFillRate()
public long getFirstFree()
public 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 | |||||||