/** * Synchronizes a node to disk. This is called by the transaction manager's * synchronization code. */ void synch( BlockIo node ) throws IOException { byte[] data = node.getData(); if ( data != null ) { long offset = node.getBlockId() * BLOCK_SIZE; file.seek( offset ); file.write( data ); } }
/** * Synchronizes a node to disk. This is called by the transaction manager's * synchronization code. */ void synch( BlockIo node ) throws IOException { byte[] data = node.getData(); if ( data != null ) { long offset = node.getBlockId() * BLOCK_SIZE; file.seek( offset ); file.write( data ); } }
/** * Synchronizes a BlockIo to disk. This is called by the transaction manager's * synchronization code. * * @param blockIo The blocIo to write on disk * @exception IOException If we have a problem while trying to write the blockIo to disk */ void sync( BlockIo blockIo ) throws IOException { byte[] data = blockIo.getData(); if ( data != null ) { // Write the data to disk now. long offset = blockIo.getBlockId() * BLOCK_SIZE; file.seek( offset ); file.write( data ); } }
/** * Synchs a node to disk. This is called by the transaction manager's * synchronization code. */ void synch(BlockIo node) throws IOException { byte[] data = node.getData(); if (data != null) { long offset = node.getBlockId() * BLOCK_SIZE; FileChannel file = getChannel(offset); file.position(offset % MAX_FILE_SIZE); file.write(ByteBuffer.wrap(data)); } }
read( file, offset, blockIo.getData(), BLOCK_SIZE );
file.write( node.getData() ); node.setClean(); free.add( node );
file.write( node.getData() ); node.setClean(); free.add( node );
FileChannel file = getChannel(offset); file.position(offset % MAX_FILE_SIZE); file.write(ByteBuffer.wrap(node.getData())); node.setClean(); free.put(node.getBlockId(),node);
toCopy = leftToWrite; System.arraycopy(data, offsetInBuffer, block.getData(), dataOffset, toCopy);
System.arraycopy( block.getData(), dataOffset, retval, offsetInBuffer, toCopy );
toCopy = leftToWrite; System.arraycopy( data, offsetInBuffer, block.getData(), dataOffset, toCopy );
toCopy = leftToRead; System.arraycopy( block.getData(), dataOffset, retval, offsetInBuffer, toCopy );
toCopy = leftToRead; System.arraycopy( block.getData(), dataOffset, retval, offsetInBuffer, toCopy );
System.arraycopy( data, offsetInBuffer, block.getData(), dataOffset, toCopy );
toCopy = leftToWrite; System.arraycopy( data, offsetInBuffer, block.getData(), dataOffset, toCopy );
read(file, offset%MAX_FILE_SIZE, node.getData(), BLOCK_SIZE);
buf.getData(), 0, file.BLOCK_SIZE); pageHdr.setType(type);
System.arraycopy( RecordFile.cleanData, 0, buf.getData(), 0, RecordFile.BLOCK_SIZE ); pageHdr.setType( type ); pageHdr.setPrev( oldLast );