|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.io.nio.AbstractBufferManager
com.tangosol.io.nio.MappedBufferManager
public class MappedBufferManager
Manages a ByteBuffer on a file.
ByteBuffer
Field Summary | |
---|---|
static int |
DEFAULT_MAX_SIZE Default maximum size for a memory mapped file. |
static int |
DEFAULT_MIN_SIZE Default minimum size for a memory mapped file. |
Constructor Summary | |
---|---|
MappedBufferManager() Construct a MappedBufferManager using defaults. |
|
MappedBufferManager(int cbInitial, int cbMaximum, java.io.File file) Construct a MappedBufferManager that supports a buffer of a certain initial and maximum size. |
Method Summary | |
---|---|
protected void |
allocateBuffer() Allocate a new buffer, copying old data if there is any. |
void |
close() Close the underlying resources. |
protected void |
configureFile(java.io.File file) Configure the buffer manager based on the passed file, which may be null to imply a default temp file, a directory to imply that a file be created in that directory, or it may be the temp file itself. |
protected void |
finalize() Perform cleanup during garbage collection. |
protected java.io.RandomAccessFile |
getFile() Obtain the RandomAccessFile that the buffer is constructed on. |
protected void |
setFile(java.io.RandomAccessFile file) Specify the RandomAccessFile that the buffer will be constructed on. |
Methods inherited from class com.tangosol.io.nio.AbstractBufferManager |
---|
calibrate, getBuffer, getCapacity, getGrowthThreshold, getMaxCapacity, getMaxIncrement, getMinCapacity, getShrinkageThreshold, grow, setBuffer, setCapacity, setGrowthThreshold, setMaxCapacity, setMinCapacity, setShrinkageThreshold, shrink |
Field Detail |
---|
public static final int DEFAULT_MIN_SIZE
public static final int DEFAULT_MAX_SIZE
Constructor Detail |
---|
public MappedBufferManager()
public MappedBufferManager(int cbInitial, int cbMaximum, java.io.File file)
cbInitial
- the initial sizecbMaximum
- the maximum sizefile
- the file to use, or the directory to use, or null to generate a temporary file in the default locationMethod Detail |
---|
protected void configureFile(java.io.File file)
file
- the file to use, or the directory to use, or null to generate a temporary file in the default locationprotected java.io.RandomAccessFile getFile()
protected void setFile(java.io.RandomAccessFile file)
file
- the RandomAccessFile objectprotected void allocateBuffer()
allocateBuffer
in class AbstractBufferManager
FileChannel.map()
public void close()
protected void finalize()
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |