public class CacheFile
extends java.lang.Object
Database
using the Database.getCacheFile
.Modifier and Type | Method | Description |
---|---|---|
long |
getMaximumSize() |
Return the maximum size for the file backing the database, or 0 if
no maximum file size has been configured.
|
boolean |
getNoFile() |
Return true if the opening of backing temporary files for in-memory
databases has been disallowed.
|
CacheFilePriority |
getPriority() |
Return the cache priority for pages from the specified file.
|
boolean |
getUnlink() |
Return true if the file will be removed when the last reference to it is
closed.
|
void |
setMaximumSize(long bytes) |
Set the
maximum size for the file backing the database.
|
void |
setNoFile(boolean onoff) |
Disallow opening backing temporary files for in-memory
databases, even if they expand to fill the entire cache.
|
void |
setPriority(CacheFilePriority priority) |
Set the
cache priority for pages from the specified file.
|
void |
setUnlink(boolean onoff) |
Remove the file when the last reference to it is closed.
|
public CacheFilePriority getPriority() throws DatabaseException
This method may be called at any time during the life of the application.
DatabaseException
- if a failure occurs.public void setPriority(CacheFilePriority priority) throws DatabaseException
The priority of a page biases the replacement algorithm to be more or less likely to discard a page when space is needed in the buffer pool. The bias is temporary, and pages will eventually be discarded if they are not referenced again. Setting the priority is only advisory, and does not guarantee pages will be treated in a specific way.
This method may be called at any time during the life of the application.
priority
- The cache priority for pages from the specified file.
DatabaseException
- if a failure occurs.public long getMaximumSize() throws DatabaseException
This method may be called at any time during the life of the application.
DatabaseException
- if a failure occurs.public void setMaximumSize(long bytes) throws DatabaseException
Attempts to allocate new pages in the file after the limit has been reached will fail.
This method may be called at any time during the life of the application.
bytes
- The maximum size for the file backing the database.
DatabaseException
- if a failure occurs.public boolean getNoFile() throws DatabaseException
This method may be called at any time during the life of the application.
DatabaseException
- if a failure occurs.public void setNoFile(boolean onoff) throws DatabaseException
Attempts to create new file pages after the cache has been filled will fail.
This method may be called at any time during the life of the application.
onoff
- If true,
disallow opening backing temporary files for in-memory
databases, even if they expand to fill the entire cache.
DatabaseException
- if a failure occurs.public boolean getUnlink() throws DatabaseException
This method may be called at any time during the life of the application.
DatabaseException
- if a failure occurs.public void setUnlink(boolean onoff) throws DatabaseException
This method may be called at any time during the life of the application.
onoff
- If true,
remove the file when the last reference to it is closed.
DatabaseException
- if a failure occurs.Copyright (c) 1996, 2020 Oracle and/or its affiliates. All rights reserved.