@Override Record internalDelete(AccessPath path, Record record) { int i = rBuff.find(record) ; if ( i < 0 ) return null ; promotePage(path, this) ; Record r2 = rBuff.get(i) ; rBuff.remove(i) ; write() ; return r2 ; }
@Override Record internalDelete(AccessPath path, Record record) { int i = rBuff.find(record) ; if ( i < 0 ) return null ; promotePage(path, this) ; Record r2 = rBuff.get(i) ; rBuff.remove(i) ; write() ; return r2 ; }
@Override Record internalInsert(AccessPath path, Record record) { // Delay promotion until we know change will happen. int i = rBuff.find(record) ; Record r2 = null ; if ( i < 0 ) { i = decodeIndex(i) ; if ( rBuff.size() >= rBuff.maxSize() ) throw new StorageException("RecordBlock.put overflow") ; promotePage(path, this) ; rBuff.add(i, record) ; } else { r2 = rBuff.get(i) ; if ( Record.compareByKeyValue(record, r2) != 0 ) { // Replace : return old promotePage(path, this) ; rBuff.set(i, record) ; } else // No promotion, no write return r2 ; } write() ; return r2 ; }
@Override Record internalInsert(AccessPath path, Record record) { // Delay promotion until we know change will happen. int i = rBuff.find(record) ; Record r2 = null ; if ( i < 0 ) { i = decodeIndex(i) ; if ( rBuff.size() >= rBuff.maxSize() ) throw new StorageException("RecordBlock.put overflow") ; promotePage(path, this) ; rBuff.add(i, record) ; } else { r2 = rBuff.get(i) ; if ( Record.compareByKeyValue(record, r2) != 0 ) { // Replace : return old promotePage(path, this) ; rBuff.set(i, record) ; } else // No promotion, no write return r2 ; } write() ; return r2 ; }
promotePage(path, y) ;
promotePage(path, node) ;
promotePage(path, node) ;