public class MappedBufferManager extends AbstractBufferManager
ByteBuffer
Base.LoggingWriter, Base.StackFrame
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
MappedBufferManager()
Construct a MappedBufferManager using defaults.
|
MappedBufferManager(int cbInitial,
int cbMaximum,
File file)
Construct a MappedBufferManager that supports a buffer of a certain
initial and maximum size.
|
Modifier and Type | Method and Description |
---|---|
protected void |
allocateBuffer()
Allocate a new buffer, copying old data if there is any.
|
void |
close()
Close the underlying resources.
|
protected void |
configureFile(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 RandomAccessFile |
getFile()
Obtain the RandomAccessFile that the buffer is constructed on.
|
protected void |
setFile(RandomAccessFile file)
Specify the RandomAccessFile that the buffer will be constructed on.
|
calibrate, getBuffer, getCapacity, getGrowthThreshold, getMaxCapacity, getMaxIncrement, getMinCapacity, getShrinkageThreshold, grow, setBuffer, setCapacity, setGrowthThreshold, setMaxCapacity, setMinCapacity, setShrinkageThreshold, shrink
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
public static final int DEFAULT_MIN_SIZE
public static final int DEFAULT_MAX_SIZE
public MappedBufferManager()
public MappedBufferManager(int cbInitial, int cbMaximum, 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 locationprotected void configureFile(File file)
file
- the file to use, or the directory to use, or null
to generate a temporary file in the default locationprotected RandomAccessFile getFile()
protected void setFile(RandomAccessFile file)
file
- the RandomAccessFile objectprotected void allocateBuffer()
allocateBuffer
in class AbstractBufferManager
FileChannel.map()
public void close()