|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.jimi.core.vmem.PageFrame
Base class for in-memory buffers representing pages of paged data. Maintains some useful state: Whether the data in the frame has been modified, when the page was last accessed, and which logical page it represents. Subclasses must implement the I/O code for swapping page frames to and from streams.
Field Summary | |
protected int |
logicalPageNumber
logical page number represented by the page frame |
protected boolean |
modified
true if the page is marked as modified |
protected long |
timeStamp
timestamp of last use |
Constructor Summary | |
PageFrame()
|
Method Summary | |
int |
getLogicalPageNumber()
Get the logical page number this frame represents. |
boolean |
isModified()
Check if the page frame has been modified in memory. |
long |
lastTouched()
Return the time for when the frame was last touched. |
abstract void |
readFrom(java.io.InputStream input)
Read in page data from an input stream. |
void |
setLogicalPageNumber(int pageNumber)
Set the logical page number this frame represents. |
void |
setModified(boolean flag)
Set whether the page frame is marked as modified |
void |
touch()
Update the timestamp to the present time. |
abstract void |
writeTo(java.io.OutputStream output)
Write the page to an output stream. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected boolean modified
protected int logicalPageNumber
protected long timeStamp
Constructor Detail |
public PageFrame()
Method Detail |
public boolean isModified()
public void setModified(boolean flag)
flag
- true if the frame is being marked as modifiedpublic void setLogicalPageNumber(int pageNumber)
pageNumber
- the logical page numberpublic int getLogicalPageNumber()
public abstract void writeTo(java.io.OutputStream output) throws java.io.IOException
output
- the stream to write topublic abstract void readFrom(java.io.InputStream input) throws java.io.IOException
input
- the stream to read frompublic long lastTouched()
public void touch()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |