public class PooledMessageFileCache
extends org.adroitlogic.ultraesb.core.AbstractFileCache
ConfigurationElement.State
availableForUse, cachedPath, createdFilesStream, fileCache, fileCacheOverflowStream, fileCacheStateEvent, fileCacheUsageStream, filesInUseStream, globalUsageStream, memoryMapEnabled, memoryMapSize, nextFileId, overflowFilesInUseStream, peakUsage, size, stopThreshold, totalFilesCreated, warnThreshold
Constructor and Description |
---|
PooledMessageFileCache(int size)
Create the specified number of temporary files in the system temporary directory and hold in cache
|
PooledMessageFileCache(java.lang.String cachedPath,
int size)
Create the specified number of temporary files and hold in cache
|
PooledMessageFileCache(java.lang.String cachedPath,
int size,
boolean memoryMapEnabled)
Create the specified number of temporary files and hold in cache
|
PooledMessageFileCache(java.lang.String cachedPath,
int size,
boolean memoryMapEnabled,
long memoryMapSize,
int warnThreshold,
int stopThreshold)
Create the specified number of temporary files and hold in cache
|
Modifier and Type | Method and Description |
---|---|
protected MessageFile |
createTempFile(java.lang.String prefix,
java.lang.String ext,
java.io.File cachedPath)
Create a temporary file with the given prefix and extension, at the given temporary file path
|
static PooledMessageFileCache |
getTestFileCache(org.adroitlogic.ultraesb.core.ConfigurationImpl config)
Deprecated.
only used for testing
|
void |
setMemoryMapEnabled(boolean memoryMapEnabled)
Turn memory mapping of temporary files on/or off
|
void |
setMemoryMapSize(long memoryMapSize)
Set the size of the memory mapping for files
|
org.adroitlogic.ultraesb.jmx.view.FileCacheView |
toDetailedView()
Return the immutable FileCacheView from JMX.
|
getDetails, getFile, registerReadyCallback, returnFile, setStopThreshold, setWarnThreshold, start, stop
equals, getDeploymentUnit, getDerivedName, getId, getState, getStreamCount, getTimerStreamMax, getTimerStreamMean, getTimerStreamMin, getTimerStreamPer, hashCode, init, isDebugOn, isStarted, maintenanceShutdown, markAsOutdated, pause, resetCounter, resetTimer, resolveMetricsStreams, resume, setBeanName, setConfig, setDebugOn, setDerivedName, setId, setMetricsEngine, setState, throwIllegalStateException, undeploy
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getDerivedName, getId, getState, isDebugOn, isStarted, maintenanceShutdown, pause, resume, retire, setConfig
public PooledMessageFileCache(int size)
size
- the number of files to create initiallypublic PooledMessageFileCache(java.lang.String cachedPath, int size)
cachedPath
- path to create temporary filessize
- the number of files to create initiallypublic PooledMessageFileCache(java.lang.String cachedPath, int size, boolean memoryMapEnabled)
cachedPath
- path to create temporary filessize
- the number of files to create initiallymemoryMapEnabled
- enable memory mappingpublic PooledMessageFileCache(java.lang.String cachedPath, int size, boolean memoryMapEnabled, long memoryMapSize, int warnThreshold, int stopThreshold)
cachedPath
- path to create temporary filessize
- the number of files to create initiallymemoryMapEnabled
- enable memory mappingmemoryMapSize
- size in bytes to map into memory (default 4096)warnThreshold
- issue a warning when this number of files have been createdstopThreshold
- maximum number of files to create@Deprecated public static PooledMessageFileCache getTestFileCache(org.adroitlogic.ultraesb.core.ConfigurationImpl config)
protected MessageFile createTempFile(java.lang.String prefix, java.lang.String ext, java.io.File cachedPath)
createTempFile
in class org.adroitlogic.ultraesb.core.AbstractFileCache
prefix
- prefix for file namesext
- extension for file namescachedPath
- path to create the temporary files atpublic void setMemoryMapSize(long memoryMapSize)
memoryMapSize
- the size in bytes to memory map (default is 4K)public void setMemoryMapEnabled(boolean memoryMapEnabled)
memoryMapEnabled
- memory mapping on if truepublic org.adroitlogic.ultraesb.jmx.view.FileCacheView toDetailedView()
toDetailedView
in class org.adroitlogic.ultraesb.core.AbstractFileCache