Class FreeSlots


  • public final class FreeSlots
    extends Object
    Organizes free slots in heap files.
    Author:
    BaseX Team 2005-23, BSD License, Christian Gruen
    • Constructor Detail

      • FreeSlots

        public FreeSlots()
    • Method Detail

      • add

        public void add​(int size,
                        long offset)
        Adds a value for the specified slot size.
        Parameters:
        size - byte size
        offset - 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 size
        offset - offset used as fallback if no free slot is available
        Returns:
        insertion offset