private void initialize(BlockIo block) { this.block = block; block.setView(this); }
/** * Constructs a new PageHeader of the indicated type. Used for newly * created pages. */ PageHeader( BlockIo block, short type ) { this.block = block; block.setView( this ); setType( type ); }
/** * Constructs a new PageHeader of the indicated type. Used for newly * created pages. */ PageHeader( BlockIo block, short type ) { this.block = block; block.setView( this ); setType( type ); }
/** * Constructs a new PageHeader of the indicated type. Used for newly * created pages. */ PageHeader( BlockIo blockIo, short type ) { this.blockIo = blockIo; blockIo.setView( this ); setType( type ); }
/** * Returns a new node. The node is retrieved (and removed) from the * released list or created new. */ private BlockIo getNewNode( long blockid ) throws IOException { BlockIo retval = null; if ( !free.isEmpty() ) { retval = free.removeFirst(); } if ( retval == null ) { retval = new BlockIo( 0, new byte[BLOCK_SIZE] ); } retval.setBlockId( blockid ); retval.setView( null ); return retval; }
/** * Returns a new node. The node is retrieved (and removed) from the * released list or created new. */ private BlockIo getNewNode( long blockid ) throws IOException { BlockIo retval = null; if ( ! free.isEmpty() ) { retval = ( BlockIo ) free.removeFirst(); } if ( retval == null ) { retval = new BlockIo( 0, new byte[BLOCK_SIZE] ); } retval.setBlockId(blockid); retval.setView( null ); return retval; }
/** * Returns a new BlockIo. The BlockIo is retrieved (and removed) from the * released list or created new. */ private BlockIo getNewBlockIo( long blockId ) throws IOException { BlockIo blockIo = null; if ( ! free.isEmpty() ) { blockIo = free.removeFirst(); blockIo.setBlockId( blockId ); } if ( blockIo == null ) { blockIo = new BlockIo( blockId, new byte[BLOCK_SIZE] ); } blockIo.setView( null ); return blockIo; }
/** * Returns a new node. The node is retrieved (and removed) * from the released list or created new. */ private BlockIo getNewNode(long blockid) throws IOException { BlockIo retval = null; if (!free.isEmpty()) { Iterator<BlockIo> it = free.valuesIterator(); retval = it.next(); it.remove(); } if (retval == null) retval = new BlockIo(0, new byte[BLOCK_SIZE]); retval.setBlockId(blockid); retval.setView(null); return retval; }
/** * Constructs a PageHeader object from a block * * @param block The block that contains the page header * @throws IOException if the block is too short to keep the page header. */ protected PageHeader( BlockIo block ) { this.block = block; block.setView( this ); if ( ! magicOk() ) { throw new Error( I18n.err( I18n.ERR_546, block.getBlockId(), getMagic() ) ); } }
/** * Constructs a PageHeader object from a block * * @param blockIo The block that contains the page header * @throws IOException if the block is too short to keep the page header. */ protected PageHeader( BlockIo blockIo ) { this.blockIo = blockIo; blockIo.setView( this ); if ( ! magicOk() ) { throw new Error( I18n.err( I18n.ERR_546, blockIo.getBlockId(), getMagic() ) ); } }
/** * Constructs a PageHeader object from a block * * @param block The block that contains the page header * @throws IOException if the block is too short to keep the page header. */ protected PageHeader( BlockIo block ) { this.block = block; block.setView( this ); if ( !magicOk() ) { throw new Error( I18n.err( I18n.ERR_546, block.getBlockId(), getMagic() ) ); } }
buf.setView(null);