public interface PageCache extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Flush all dirty pages and close the page cache.
|
void |
flushAndForce()
Flush all dirty pages
|
PagedFile |
map(File file,
int pageSize,
OpenOption... openOptions)
Ask for a handle to a paged file, backed by this page cache.
|
int |
maxCachedPages()
The max number of cached pages.
|
int |
pageSize()
The size in bytes of the pages managed by this cache.
|
PagedFile map(File file, int pageSize, OpenOption... openOptions) throws IOException
file - The file to map.pageSize - The file page size to use for this mapping. If the file is already mapped with a different page
size, an exception will be thrown.openOptions - The set of open options to use for mapping this file. The
StandardOpenOption.READ and StandardOpenOption.WRITE options always
implicitly specified. The StandardOpenOption.CREATE open option will create the given
file if it does not already exist, and the StandardOpenOption.TRUNCATE_EXISTING will
truncate any existing file iff it has not already been mapped.
All other options are either silently ignored, or will cause an exception to be thrown.NoSuchFileException - if the given file does not exist, and the
StandardOpenOption.CREATE option was not specified.IOException - if the file could otherwise not be mapped.void flushAndForce()
throws IOException
IOExceptionvoid close()
throws IOException
close in interface AutoCloseableIOExceptionint pageSize()
int maxCachedPages()
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.