public interface Page
Pages may be "dirty", indicating that they have been modified since they were last written out to disk. For recovery purposes, pages MUST have a single constructor of the form: Page(PageId id, byte[] data)
Modifier and Type | Method and Description |
---|---|
Page |
getBeforeImage()
Provide a representation of this page before any modifications were made
to it.
|
PageId |
getId()
Return the id of this page.
|
byte[] |
getPageData()
Generates a byte array representing the contents of this page.
|
TransactionId |
isDirty()
Get the id of the transaction that last dirtied this page, or null if the page is clean..
|
void |
markDirty(boolean dirty,
TransactionId tid)
Set the dirty state of this page as dirtied by a particular transaction
|
void |
setBeforeImage() |
PageId getId()
TransactionId isDirty()
void markDirty(boolean dirty, TransactionId tid)
byte[] getPageData()
The invariant here is that it should be possible to pass the byte array generated by getPageData to the Page constructor and have it produce an identical Page object.
Page getBeforeImage()
void setBeforeImage()