/** * Releases a block. * * @param blockId The record number to release. * @param isDirty If true, the block was modified since the get(). */ void release( long blockId, boolean isDirty ) throws IOException { BlockIo blockIo = inUse.get( blockId ); if ( blockIo == null ) { throw new IOException( I18n.err( I18n.ERR_555, blockId ) ); } if ( ! blockIo.isDirty() && isDirty ) { blockIo.setDirty(); } release( blockIo ); }
/** * Releases a block. * * @param blockid The record number to release. * @param isDirty If true, the block was modified since the get(). */ void release(long blockid, boolean isDirty) throws IOException { BlockIo node = inUse.get(blockid); if (node == null) throw new IOException("bad blockid " + blockid + " on release"); if (!node.isDirty() && isDirty) node.setDirty(); release(node); }
/** * Releases a block. * * @param blockid The record number to release. * @param isDirty If true, the block was modified since the get(). */ void release( long blockid, boolean isDirty ) throws IOException { BlockIo node = inUse.get( blockid ); if ( node == null ) { throw new IOException( I18n.err( I18n.ERR_555, blockid ) ); } if ( !node.isDirty() && isDirty ) { node.setDirty(); } release( node ); }
/** * Releases a block. * * @param blockid The record number to release. * @param isDirty If true, the block was modified since the get(). */ void release( long blockid, boolean isDirty ) throws IOException { BlockIo node = inUse.get( blockid ); if ( node == null ) { throw new IOException( I18n.err( I18n.ERR_555, blockid ) ); } if ( ! node.isDirty() && isDirty ) { node.setDirty(); } release( node ); }
/** * Releases a block. * * @param block The block to release. */ void release( BlockIo block ) { inUse.remove( block.getBlockId() ); if ( block.isDirty() ) { // System.out.println( "Dirty: " + key + block ); dirty.put( block.getBlockId(), block ); } else { if ( !transactionsDisabled && block.isInTransaction() ) { inTxn.put( block.getBlockId(), block ); } else { free.add( block ); } } }
/** * Releases a block. * * @param block The block to release. */ void release( BlockIo block ) { inUse.remove( block.getBlockId() ); if ( block.isDirty() ) { // System.out.println( "Dirty: " + key + block ); dirty.put( block.getBlockId(), block ); } else { if ( ! transactionsDisabled && block.isInTransaction() ) { inTxn.put( block.getBlockId(), block ); } else { free.add( block ); } } }
if ( blockIo.isDirty() )
/** * Releases a block. * * @param block The block to release. */ void release( BlockIo block ) { inUse.remove( block.getBlockId() ); if ( block.isDirty() ) { // System.out.println( "Dirty: " + key + block ); dirty.put( block.getBlockId(), block ); } else { if ( ! transactionsDisabled && block.isInTransaction() ) { inTxn.put( block.getBlockId(), block ); } else { free.add( block ); } } }
/** * Releases a block. * * @param block The block to release. */ void release(BlockIo block) { long key =block.getBlockId(); inUse.remove(key); if (block.isDirty()) { // System.out.println( "Dirty: " + key + block ); dirty.put(key, block); } else { if (!transactionsDisabled && block.isInTransaction()) { inTxn.put(key, block); } else { free.put(block.getBlockId(),block); } } }