/** Returns the value of the indicated slot */ FreePhysicalRowId get( int slot ) { if ( slots[slot] == null ) { slots[slot] = new FreePhysicalRowId( block, slotToOffset( slot ) ) ; } return slots[slot]; }
/** Returns the value of the indicated slot */ FreePhysicalRowId get( int slot ) { if ( slots[slot] == null ) { slots[slot] = new FreePhysicalRowId( block, slotToOffset( slot ) ) ; } return slots[slot]; }
/** Returns true if a slot is allocated */ boolean isAllocated(int slot) { short pos = slotToOffset(slot); return FreePhysicalRowId_getSize(pos) != 0; }
/** * Returns the value of the indicated slot */ FreePhysicalRowId get( int slot ) { if ( slots[slot] == null ) { slots[slot] = new FreePhysicalRowId( blockIo, slotToOffset( slot ) ) ; } return slots[slot]; }
/** Allocates a slot */ short alloc(int slot) { setCount((short) (getCount() + 1)); return slotToOffset(slot); }
short pos = slotToOffset(i); long theSize = FreePhysicalRowId_getSize(pos); // capacity of this free record. long waste = theSize - size; // when non-negative, record has suf. capacity.
/** Frees a slot */ void free(int slot) { short pos = slotToOffset(slot); FreePhysicalRowId_setSize(pos, 0); //get(slot).setSize(0); setCount((short) (getCount() - 1)); }
public long slotToLocation(int slot) { short pos = slotToOffset(slot); return Location.toLong(getLocationBlock(pos),getLocationOffset(pos)); }