public interface PageSwapper
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close and release all resources associated with the file underlying this
PageSwapper.
|
void |
evicted(long pageId,
Page page)
Notification that a page has been evicted, used to clean up state in structures
outside the page table.
|
File |
file()
Get the file that this PageSwapper represents.
|
void |
force()
Synchronise all writes done by this PageSwapper, with the underlying
storage device.
|
long |
getLastPageId()
Get the filePageId of the last page in the concrete file.
|
int |
read(long filePageId,
Page page)
Read the page with the given filePageId, from the concrete file on the
file system, into the given page.
|
int |
write(long filePageId,
Page page)
Write the contents of the given page, to the concrete file on the file
system, at the located indicated by the given filePageId.
|
int read(long filePageId,
Page page)
throws IOException
Page.swapIn(org.neo4j.io.fs.StoreChannel, long, int) method.
Returns the number of bytes read in from the file. May be zero if the
requested page was beyond the end of the file. If less than the file
page size, then the rest of the page will contain zeros.
Note: It is possible for the channel to be asynchronously closed while
this operation is taking place. For instance, if the current thread is
interrupted. If this happens, then the implementation must reopen the
channel and the operation must be retried.IOExceptionint write(long filePageId,
Page page)
throws IOException
Page.swapOut(org.neo4j.io.fs.StoreChannel, long, int) method.
Returns the number of bytes written to the file.
Note: It is possible for the channel to be asynchronously closed while
this operation is taking place. For instance, if the current thread is
interrupted. If this happens, then implementation must reopen the
channel and the operation must be retried.IOExceptionvoid evicted(long pageId,
Page page)
File file()
void close()
throws IOException
IOExceptionvoid force()
throws IOException
IOExceptionlong getLastPageId()
throws IOException
IOExceptionCopyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.