void flush ( ) { internalLock . writeLock ( ) . lock ( ) ; flushLock . lock ( ) ; try { if ( isNew || modifiedBy . size ( ) > 0 ) { VanillaDb . logMgr ( ) . flush ( lastLsn ) ; contents . write ( blk ) ; modifiedBy . clear ( ) ; isNew = false ; } } finally { flushLock . unlock ( ) ; internalLock . writeLock ( ) . unlock ( ) ; } }
Writes the page to its disk block if the page is dirty . The method ensures that the corresponding log record has been written to disk prior to writing the page to disk .