public class PageCache
extends java.lang.Object
Constructor and Description |
---|
PageCache(long pageSize,
long maxNumPages,
PageFetcher fetcher)
The pageSize must be a power of two and implicitly specifies the
alignment of pages.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
A mechanism for clearing out the cache is necessary to handle
detaching and reattaching
|
void |
clear(long startAddress,
long numBytes)
A mechanism for clearing cached data covering the given region
|
void |
disable()
Disables the page cache; no further pages will be added to the
cache and all existing pages will be flushed.
|
void |
enable()
Enables the page cache; fetched pages will be added to the
cache.
|
boolean |
getBoolean(long address) |
byte |
getByte(long address) |
char |
getChar(long address,
boolean bigEndian) |
byte[] |
getData(long startAddress,
long numBytes)
This handles fetches which span multiple pages by virtue of the
presence of the PageFetcher.
|
double |
getDouble(long address,
boolean bigEndian) |
float |
getFloat(long address,
boolean bigEndian) |
int |
getInt(long address,
boolean bigEndian) |
long |
getLong(long address,
boolean bigEndian) |
short |
getShort(long address,
boolean bigEndian) |
public PageCache(long pageSize, long maxNumPages, PageFetcher fetcher)
public byte[] getData(long startAddress, long numBytes) throws UnmappedAddressException
UnmappedAddressException
public boolean getBoolean(long address)
public byte getByte(long address)
public short getShort(long address, boolean bigEndian)
public char getChar(long address, boolean bigEndian)
public int getInt(long address, boolean bigEndian)
public long getLong(long address, boolean bigEndian)
public float getFloat(long address, boolean bigEndian)
public double getDouble(long address, boolean bigEndian)
public void clear(long startAddress, long numBytes)
public void clear()
public void disable()
public void enable()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2016, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.