Class RamJournalRM.DefaultDependencies
java.lang.Object
com.tangosol.io.journal.AbstractJournalRM.DefaultDependencies
com.tangosol.io.journal.RamJournalRM.DefaultDependencies
- All Implemented Interfaces:
AbstractJournalRM.Dependencies,RamJournalRM.Dependencies
- Enclosing class:
RamJournalRM
public static class RamJournalRM.DefaultDependencies
extends AbstractJournalRM.DefaultDependencies
implements RamJournalRM.Dependencies
The DefaultDependencies class provides a default implementation of Dependencies.
- Since:
- Coherence 3.7
- Author:
- cp/cf 2010-06-24
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleDefault collection factor (collect files that are 84% or less utilized).static final longDefault pool size (16MB).static final longDefault total size of RAM used (1GB).static final intDefault maximum value size (16KB).static final longMaximum size of a "file" i.e. a buffer (2GB).static final longMaximum pool size (64GB).static final longMaximum total size of RAM used (64GB).static final intMaximum value size (4MB).static final longMinimum maximum size of a "file" i.e. a buffer (1MB).static final longMinimum maximum total size of RAM used (16MB).Fields inherited from class com.tangosol.io.journal.AbstractJournalRM.DefaultDependencies
m_cbMaxFile, m_cbMaxSize, m_cbMaxValue, m_cCollectorTimeout, m_dflLoadFactorGC, MAX_COLLECT_PCT, MAX_FILE_COUNT, MIN_COLLECT_PCT, MIN_TIMEOUT -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a DefaultDependencies object.Construct a DefaultDependencies object. -
Method Summary
Modifier and TypeMethodDescriptionprotected doubleGet the default percentage at which a file is eligible for garbage collection.protected longGet the default maximum file size for this Journal Resource Manager.protected longGet the default maximum size (capacity) for this Journal Resource Manager.protected intGet the default maximum value size for this Journal Resource Manager.longReturn the maximum size (in bytes) of the buffers that can be held by the pool.protected longReturn the highest memory size that can be allocated per journal file.protected longReturn the highest memory size that can be allocated per journal.protected intReturn the highest memory size permitted for each value stored in the journal.protected longReturn the lowest memory size that can be allocated per journal file.protected longReturn the lowest memory size that can be allocated per journal.booleanisNioRam()Return if the journal will use off-heap buffers (NIO RAM) instead of on-heap buffers (byte arrays).setMaxPoolSize(long maxPool) Set the size of the buffers pool.setNioRam(boolean fUseNioRam) Set the journal to use direct buffers (NIO RAM) versus on-heap buffers (byte arrays) to store the journal data.toString()Return the DefautlDependencies in String format.validate()Validate the supplied dependencies.Methods inherited from class com.tangosol.io.journal.AbstractJournalRM.DefaultDependencies
calculateMaxFileSize, getCollectorLoadFactor, getCollectorTimeout, getDefaultCollectorTimeout, getMaxFileSize, getMaxJournalSize, getMaxValueSize, setCollectorLoadFactor, setCollectorTimeout, setMaxFileSize, setMaxJournalSize, setMaxValueSize, validateCollectorTimeout, validateJournalSize, validateLoadFactor, validateMaxValueSizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.tangosol.io.journal.AbstractJournalRM.Dependencies
getCollectorLoadFactor, getCollectorTimeout, getMaxFileSize, getMaxJournalSize, getMaxValueSize
-
Field Details
-
MIN_FILE_SIZE
public static final long MIN_FILE_SIZEMinimum maximum size of a "file" i.e. a buffer (1MB).- See Also:
-
MAX_FILE_SIZE
public static final long MAX_FILE_SIZEMaximum size of a "file" i.e. a buffer (2GB).- See Also:
-
MIN_TOTAL_SIZE
public static final long MIN_TOTAL_SIZEMinimum maximum total size of RAM used (16MB).- See Also:
-
MAX_TOTAL_SIZE
public static final long MAX_TOTAL_SIZEMaximum total size of RAM used (64GB).- See Also:
-
DFT_TOTAL_SIZE
public static final long DFT_TOTAL_SIZEDefault total size of RAM used (1GB).- See Also:
-
MAX_VALUE_SIZE
public static final int MAX_VALUE_SIZEMaximum value size (4MB).- See Also:
-
DFT_VALUE_SIZE
public static final int DFT_VALUE_SIZEDefault maximum value size (16KB).- See Also:
-
DFT_COLLECT_PCT
public static final double DFT_COLLECT_PCTDefault collection factor (collect files that are 84% or less utilized).- See Also:
-
MAX_POOL_SIZE
public static final long MAX_POOL_SIZEMaximum pool size (64GB).- See Also:
-
DFT_POOL_SIZE
public static final long DFT_POOL_SIZEDefault pool size (16MB).- See Also:
-
-
Constructor Details
-
DefaultDependencies
public DefaultDependencies()Construct a DefaultDependencies object. -
DefaultDependencies
Construct a DefaultDependencies object. Copy the values from the specified Dependencies object.- Parameters:
deps- the dependencies to copy, or null
-
-
Method Details
-
isNioRam
public boolean isNioRam()Return if the journal will use off-heap buffers (NIO RAM) instead of on-heap buffers (byte arrays).- Specified by:
isNioRamin interfaceRamJournalRM.Dependencies- Returns:
- true if the journal is configured to use NIO "direct buffer" RAM
-
setNioRam
Set the journal to use direct buffers (NIO RAM) versus on-heap buffers (byte arrays) to store the journal data. The default is that the journal data is kept on heap in byte arrays.- Parameters:
fUseNioRam- pass true to use NIO direct buffers off the heap, or false to use byte arrays on the heap- Returns:
- this object
-
getMaxPoolSize
public long getMaxPoolSize()Return the maximum size (in bytes) of the buffers that can be held by the pool. This is not a limit of how many buffers can be allocated, since some may be in use at any time, but rather how many will be held by the pool (i.e. recycled) as they are released.- Specified by:
getMaxPoolSizein interfaceRamJournalRM.Dependencies- Returns:
- the maximum size in bytes of all of the buffers that the buffer pool can hold onto
-
setMaxPoolSize
Set the size of the buffers pool. The default is defined byDFT_POOL_SIZE, with a maximum defined byMAX_POOL_SIZEand a minimum of zero.- Parameters:
maxPool- the size, in bytes, for the buffer pool- Returns:
- this object
-
validate
Validate the supplied dependencies.- Overrides:
validatein classAbstractJournalRM.DefaultDependencies- Returns:
- this object
- Throws:
IllegalArgumentException- if the dependencies are not valid
-
getDefaultMaxFileSize
protected long getDefaultMaxFileSize()Get the default maximum file size for this Journal Resource Manager.- Specified by:
getDefaultMaxFileSizein classAbstractJournalRM.DefaultDependencies- Returns:
- the default maximum file size
-
getDefaultMaxValueSize
protected int getDefaultMaxValueSize()Get the default maximum value size for this Journal Resource Manager.- Specified by:
getDefaultMaxValueSizein classAbstractJournalRM.DefaultDependencies- Returns:
- the default maximum value size
-
getDefaultMaxSize
protected long getDefaultMaxSize()Get the default maximum size (capacity) for this Journal Resource Manager.- Specified by:
getDefaultMaxSizein classAbstractJournalRM.DefaultDependencies- Returns:
- the default maximum size
-
getDefaultCollectorLoadFactor
protected double getDefaultCollectorLoadFactor()Get the default percentage at which a file is eligible for garbage collection.- Specified by:
getDefaultCollectorLoadFactorin classAbstractJournalRM.DefaultDependencies- Returns:
- the default garbage collection load factor
-
getPermittedMinJournalSize
protected long getPermittedMinJournalSize()Return the lowest memory size that can be allocated per journal.- Specified by:
getPermittedMinJournalSizein classAbstractJournalRM.DefaultDependencies- Returns:
- the lowest memory size that can be allocated per journal
-
getPermittedMaxJournalSize
protected long getPermittedMaxJournalSize()Return the highest memory size that can be allocated per journal.- Specified by:
getPermittedMaxJournalSizein classAbstractJournalRM.DefaultDependencies- Returns:
- the highest memory size that can be allocated per journal
-
getPermittedMinFileSize
protected long getPermittedMinFileSize()Return the lowest memory size that can be allocated per journal file.- Specified by:
getPermittedMinFileSizein classAbstractJournalRM.DefaultDependencies- Returns:
- the lowest memory size that can be allocated per journal file
-
getPermittedMaxFileSize
protected long getPermittedMaxFileSize()Return the highest memory size that can be allocated per journal file.- Specified by:
getPermittedMaxFileSizein classAbstractJournalRM.DefaultDependencies- Returns:
- the highest memory size that can be allocated per journal file
-
getPermittedMaxValueSize
protected int getPermittedMaxValueSize()Return the highest memory size permitted for each value stored in the journal.- Specified by:
getPermittedMaxValueSizein classAbstractJournalRM.DefaultDependencies- Returns:
- the highest memory size permitted for each value stored in the journal
-
toString
Return the DefautlDependencies in String format.- Overrides:
toStringin classAbstractJournalRM.DefaultDependencies- Returns:
- the DefautlDependencies in String format
-