/** Sets the available size */ static void setAvailableSize(final BlockIo block, final short pos,int value) { // if(value != roundAvailableSize(value)) // throw new IllegalArgumentException("value is not rounded"); int oldCurrSize = getCurrentSize(block,pos); block.writeUnsignedShort(pos + O_AVAILABLESIZE, convert(value)); setCurrentSize(block,pos,oldCurrSize); }
private void free( Location id ) throws IOException { // get the rowid, and write a zero current size into it. BlockIo curBlock = file.get( id.getBlock() ); RecordHeader hdr = new RecordHeader( curBlock, id.getOffset() ); hdr.setCurrentSize( 0 ); file.release( id.getBlock(), true ); // write the rowid to the free list freePageManager.put( id, hdr.getAvailableSize() ); }
private void free( Location id ) throws IOException { // get the rowid, and write a zero current size into it. BlockIo curBlock = file.get( id.getBlock() ); RecordHeader hdr = new RecordHeader( curBlock, id.getOffset() ); hdr.setCurrentSize( 0 ); file.release( id.getBlock(), true ); // write the rowid to the free list freeman.put( id, hdr.getAvailableSize() ); }
private void free( Location id ) throws IOException { // get the rowid, and write a zero current size into it. BlockIo curBlock = file.get( id.getBlock() ); RecordHeader hdr = new RecordHeader( curBlock, id.getOffset() ); hdr.setCurrentSize( 0 ); file.release( id.getBlock(), true ); // write the rowid to the free list freeman.put( id, hdr.getAvailableSize() ); }
private void free(long id) throws IOException { // get the rowid, and write a zero current size into it. BlockIo curBlock = file.get(Location.getBlock(id)); DataPage curPage = DataPage.getDataPageView(curBlock,BLOCK_SIZE); RecordHeader.setCurrentSize(curBlock, Location.getOffset(id), 0); file.release(Location.getBlock(id), true); // write the rowid to the free list freeman.put(id, RecordHeader.getAvailableSize(curBlock, Location.getOffset(id))); }
BlockIo block = file.get(curs.getCurrent()); short hdr = Location.getOffset(rowid); RecordHeader.setCurrentSize(block, hdr, length); if (length == 0) { file.release(curs.getCurrent(), true);
BlockIo block = file.get( curs.getCurrent() ); RecordHeader hdr = new RecordHeader( block, rowid.getOffset() ); hdr.setCurrentSize( length ); if ( length == 0 ) { file.release( curs.getCurrent(), true );
BlockIo block = file.get( curs.getCurrent() ); RecordHeader hdr = new RecordHeader( block, rowid.getOffset() ); hdr.setCurrentSize( length ); if ( length == 0 ) { file.release( curs.getCurrent(), true );
BlockIo block = file.get( curs.getBlockId() ); RecordHeader hdr = new RecordHeader( block, rowid.getOffset() ); hdr.setCurrentSize( length );
curPage.setFirst(DataPage.O_DATA); RecordHeader.setAvailableSize(curBlock, DataPage.O_DATA, 0); RecordHeader.setCurrentSize(curBlock, DataPage.O_DATA, 0); } else { curBlock = file.get(start);
RecordHeader hdr = new RecordHeader( curBlock, DataPage.O_DATA ); hdr.setAvailableSize( 0 ); hdr.setCurrentSize( 0 ); } else { curBlock = file.get( start );
RecordHeader hdr = new RecordHeader( curBlock, DataPage.O_DATA ); hdr.setAvailableSize( 0 ); hdr.setCurrentSize( 0 ); } else { curBlock = file.get( start );
RecordHeader hdr = new RecordHeader( curBlock, DataPage.O_DATA ); hdr.setAvailableSize( 0 ); hdr.setCurrentSize( 0 );