Class FreeSlotsFixedLength

java.lang.Object
com.semedy.reasoner.edb.persistentstore.bplustree.FreeSlotsFixedLength
All Implemented Interfaces:
FreeSlotsHandler

public class FreeSlotsFixedLength extends Object implements FreeSlotsHandler
Handles file pices with fixed length
Author:
angele
  • Constructor Summary

    Constructors
    Constructor
    Description
    FreeSlotsFixedLength(RandomAccessToFile file, long pagesPosition, long freePosition, long validPosition, int nodeSize)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    allocate(int length)
    allocate a new address and get index of it
    void
    allocate(int index, int length)
    search for a new address for index
    int
    append(int length)
    append a slot of length len at end of file
    void
    clear all used slots
    void
    copy all pages and free slots from freeSlots to this
    void
    free(int index)
    free address at index
    void
    free(long address)
    free address
    long
    getAddress(int index)
    get the file address of slot index
    boolean
    is it valid?
    void
    load slot table from file
    void
    save slot table to file
    void
    set basic file
    void
    setValid(boolean b)
    set valid flag
    int
    number of slots
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait