JournalBinaryStore
instead@Deprecated public class DirectBufferManager extends AbstractBufferManager
ByteBuffer
Base.LoggingWriter, Base.StackFrame
Modifier and Type | Field and Description |
---|---|
static int |
CLEANUP_FINALIZERS
Deprecated.
Use Runtime.runFinalization() to trigger finalization (default).
|
static int |
CLEANUP_GC
Deprecated.
Use Runtime.gc() to trigger finalization.
|
static int |
CLEANUP_NONE
Deprecated.
Do not perform any buffer cleanup.
|
protected static boolean |
MODE_DEBUG
Deprecated.
Set to true to use on-heap storage, false to use off-heap.
|
protected static long |
s_cbUncollected
Deprecated.
Total amount of memory that have not been collected yet.
|
Constructor and Description |
---|
DirectBufferManager(int cbInitial,
int cbMaximum)
Deprecated.
Construct a DirectBufferManager that supports a buffer of a certain
initial and maximum size.
|
Modifier and Type | Method and Description |
---|---|
protected void |
allocateBuffer()
Deprecated.
Allocate a new buffer, copying old data if there is any.
|
protected void |
cleanupBuffers()
Deprecated.
Determines if and how to induce the JVM to run finalizers.
|
static int |
getAllocations()
Deprecated.
Return the total number of buffers allocated by the DirectBufferManager.
|
static int |
getCleanupMethod()
Deprecated.
Return the method used for buffers cleanup when the threshold is met.
|
static float |
getCleanupThreshold()
Deprecated.
Return the value used to calculate the size threshold for the
uncollected buffers that triggers a cleanup operation.
|
static long |
getTotalAllocationTime()
Deprecated.
Return the total time spent allocating buffers, copying the previous
content and cleaning up uncollected buffers.
|
protected static void |
setCleanupMethod(int nCleanupMethod)
Deprecated.
Set the method to be used for buffers cleanup when the threshold is met.
|
protected static void |
setCleanupThreshold(float flCleanupThreshold)
Deprecated.
Determines how often, to run the
cleanupBuffers() method. |
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 CLEANUP_NONE
public static final int CLEANUP_FINALIZERS
public static final int CLEANUP_GC
protected static final boolean MODE_DEBUG
protected static volatile long s_cbUncollected
public DirectBufferManager(int cbInitial, int cbMaximum)
cbInitial
- the initial sizecbMaximum
- the maximum sizeprotected void allocateBuffer()
allocateBuffer
in class AbstractBufferManager
ByteBuffer.allocateDirect()
protected void cleanupBuffers()
When the amount of uncollected garbage reaches the threshold indicated
by the cleanup threshold
frequency,
induce the GC. In a 64-bit VMs this issue is probably reduced to a
minimum.
public static long getTotalAllocationTime()
public static int getAllocations()
public static int getCleanupMethod()
The possible return values are:
protected static void setCleanupMethod(int nCleanupMethod)
nCleanupMethod
- a value representing the cleanup method; valid
values are the CLEANUP_* constantsIllegalArgumentException
- if passed value is not a valid
CLEANUP_* constantpublic static float getCleanupThreshold()
protected static void setCleanupThreshold(float flCleanupThreshold)
cleanupBuffers()
method.
Cleanup is performed when the uncollected memory has grown over the
product of this value and the maximum Java heap size.flCleanupThreshold
- a value between 0.0 and 1.0 used to
calculate the cleanup frequencyIllegalArgumentException
- if the passed value is not valid