Package org.basex.util
Class FreeSlots
- java.lang.Object
-
- org.basex.util.FreeSlots
-
public final class FreeSlots extends Object
Organizes free slots in heap files.- Author:
- BaseX Team 2005-24, BSD License, Christian Gruen
-
-
Constructor Summary
Constructors Constructor Description FreeSlots()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int size, long offset)
Adds a value for the specified slot size.long
get(int size, long offset)
Returns the offset of a slot that is greater than or equal to the specified size.String
toString()
-
-
-
Method Detail
-
add
public void add(int size, long offset)
Adds a value for the specified slot size.- Parameters:
size
- byte sizeoffset
- file offset
-
get
public long get(int size, long offset)
Returns the offset of a slot that is greater than or equal to the specified size.- Parameters:
size
- ideal (minimum) slot sizeoffset
- offset used as fallback if no free slot is available- Returns:
- insertion offset
-
-