/** * {@inheritDoc} */ public String toString() { StringBuilder sb = new StringBuilder(); sb.append( "FreeLogRowIdPage ( " ); // The blockIO sb.append( super.toString() ).append( ", " ); // The first rowId sb.append( "count: " ).append( getCount() ); // Dump the Physical row id for ( int i = 0; i < ELEMS_PER_PAGE; i++ ) { if ( slots[i] != null ) { sb.append( ", [" ).append( i ).append( "]=<" ).append( slots[i].getBlock() ).append( ", " ).append( slots[i].getOffset() ).append( ">" ); } } sb.append( ")" ); return sb.toString(); } }
/** Frees a slot */ void free(int slot) { setLocationBlock(slotToOffset(slot), 0); //get(slot).setBlock(0); setCount((short) (getCount() - 1)); // update previousFoundFree if the freed slot is before what we've found in the past if (slot < previousFoundFree) previousFoundFree = slot; }
/** Frees a slot */ void free(int slot) { get(slot).setBlock(0); setCount((short) (getCount() - 1)); }
/** Allocates a slot */ short alloc(int slot) { setCount((short) (getCount() + 1)); short pos = slotToOffset(slot); setLocationBlock(pos, -1); //get(slot).setBlock(-1); // update previousFoundAllocated if the newly allocated slot is before what we've found in the past if (slot < previousFoundAllocated) previousFoundAllocated = slot; return pos; }
/** Frees a slot */ void free(int slot) { get(slot).setBlock(0); setCount((short) (getCount() - 1)); }
/** * Frees a slot */ void free( int slot ) { get( slot ).setBlock( 0 ); setCount( (short) ( getCount() - 1 ) ); }
/** Allocates a slot */ PhysicalRowId alloc(int slot) { setCount((short) (getCount() + 1)); get(slot).setBlock(-1); return get(slot); }
/** Allocates a slot */ PhysicalRowId alloc(int slot) { setCount((short) (getCount() + 1)); get(slot).setBlock(-1); return get(slot); }
/** * Allocates a slot */ PhysicalRowId alloc( int slot ) { setCount( (short) ( getCount() + 1 ) ); get( slot ).setBlock( -1 ); return get( slot ); }
if (fp.getCount() == 0) {
boolean hasMore = fp.getCount() != 0;
new Location(fp.get(slot)); fp.free(slot); if (fp.getCount() == 0) {
new Location(fp.get(slot)); fp.free(slot); if (fp.getCount() == 0) {