public class FreeSpaceMap extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FreeSpaceMap.Slot
Describes an area of free space in the storage.
|
| Constructor and Description |
|---|
FreeSpaceMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
allocateSpace(FreeSpaceMap.Slot s) |
void |
allocateSpace(long _position,
int _size)
Used to rebuild the free space map.
|
FreeSpaceMap.Slot |
findFree(int size)
Find a slot which size is greater then the needed size and
remove it from the free space map.
|
void |
freeSpace(FreeSpaceMap.Slot s) |
void |
freeSpace(long _position,
int _size)
Free the space.
|
long |
getFreeSpace() |
FreeSpaceMap.Slot |
getHighestSlot() |
long |
getSizeOfLargestSlot() |
long |
getSizeOfSmallestSlot() |
int |
getSlotCount() |
void |
init() |
void |
put(FreeSpaceMap.Slot s) |
FreeSpaceMap.Slot |
reserveSlotEndingAt(long pos)
Get the slot that ends at the position exclusive or: start + size = pos
|
public FreeSpaceMap()
public void init()
public void put(FreeSpaceMap.Slot s)
public FreeSpaceMap.Slot reserveSlotEndingAt(long pos)
public FreeSpaceMap.Slot getHighestSlot()
public FreeSpaceMap.Slot findFree(int size)
public void allocateSpace(FreeSpaceMap.Slot s)
public void allocateSpace(long _position, int _size)
IllegalArgumentException - if space is not availablepublic void freeSpace(FreeSpaceMap.Slot s)
public void freeSpace(long _position, int _size)
public long getFreeSpace()
public int getSlotCount()
public long getSizeOfLargestSlot()
public long getSizeOfSmallestSlot()
cache2k API documentation. Copyright © 2000–2015 headissue GmbH, Munich.