/** * Closes the page manager. This flushes the page manager and releases * the lock on the header. */ void close() throws IOException { file.release( headerBuf ); file.commit(); headerBuf = null; header = null; file = null; }
/** * Closes the page manager. This flushes the page manager and releases * the lock on the header. */ void close() throws IOException { recordFile.release( headerBuf ); recordFile.commit(); headerBuf = null; header = null; recordFile = null; }
/** * Closes the page manager. This flushes the page manager and releases * the lock on the header. */ void close() throws IOException { recordFile.release( headerBuf ); recordFile.commit(); headerBuf = null; header = null; recordFile = null; }
/** * Closes the page manager. This flushes the page manager and releases * the lock on the header. */ void close() throws IOException { file.release(headerBuf); file.commit(); headerBuf = null; header = null; file = null; }
/** * Returns the page before the indicated block */ long getPrev(long block) throws IOException { try { return PageHeader.getView(file.get(block)).getPrev(); } finally { file.release(block, false); } }
/** * Returns the page following the indicated block */ long getNext(long block) throws IOException { try { return PageHeader.getView(file.get(block)).getNext(); } finally { file.release(block, false); } }
/** * Returns the page following the indicated block */ long getNext( long block ) throws IOException { try { return PageHeader.getView( recordFile.get( block ) ).getNext(); } finally { recordFile.release( block, false ); } }
/** * Returns the page before the indicated block */ long getPrev( long block ) throws IOException { try { return PageHeader.getView( recordFile.get( block ) ).getPrev(); } finally { recordFile.release( block, false ); } }
/** * Returns the page before the indicated block */ long getPrev( long block ) throws IOException { try { return PageHeader.getView( recordFile.get( block ) ).getPrev(); } finally { recordFile.release( block, false ); } }
/** * Commit all pending (in-memory) data by flushing the page manager. * This forces a flush of all outstanding blocks (this is an implicit * {@link RecordFile#commit} as well). */ void commit() throws IOException { // write the header out file.release( headerBuf ); file.commit(); // and obtain it again headerBuf = file.get( 0 ); header = new FileHeader( headerBuf, false ); }
/** * Commit all pending (in-memory) data by flushing the page manager. * This forces a flush of all outstanding blocks (this it's an implicit * {@link RecordFile#commit} as well). */ void commit() throws IOException { // write the header out file.release(headerBuf); file.commit(); // and obtain it again headerBuf = file.get(0); header = new FileHeader(headerBuf, false); }
/** * Returns the page following the indicated block */ long getNext( long block ) throws IOException { try { return PageHeader.getView( file.get( block ) ).getNext(); } finally { file.release( block, false ); } }
/** * Returns the page following the indicated block */ long getNext( long block ) throws IOException { try { return PageHeader.getView( recordFile.get( block ) ).getNext(); } finally { recordFile.release( block, false ); } }
/** * Commit all pending (in-memory) data by flushing the page manager. * This forces a flush of all outstanding blocks (this is an implicit * {@link RecordFile#commit} as well). */ void commit() throws IOException { // write the header out recordFile.release( headerBuf ); recordFile.commit(); // and obtain it again headerBuf = recordFile.get( 0 ); header = new FileHeader( headerBuf, false ); }
/** * Returns the page before the indicated block */ long getPrev( long block ) throws IOException { try { return PageHeader.getView( file.get( block ) ).getPrev(); } finally { file.release( block, false ); } }
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))); }
/** * Releases the indicated logical rowid. */ void delete(long rowid) throws IOException { //zero out old location, is needed for defragmentation TranslationPage xlatPage = TranslationPage.getTranslationPageView(file.get(Location.getBlock(rowid)),blockSize); xlatPage.setLocationBlock(Location.getOffset(rowid), 0); xlatPage.setLocationOffset(Location.getOffset(rowid), (short)0); file.release(Location.getBlock(rowid), true); freeman.put(rowid); }