Package org.apache.camel.core.xml
Class CamelStreamCachingStrategyDefinition
- java.lang.Object
-
- org.apache.camel.model.IdentifiedType
-
- org.apache.camel.core.xml.CamelStreamCachingStrategyDefinition
-
@Metadata(label="spring,configuration") public class CamelStreamCachingStrategyDefinition extends org.apache.camel.model.IdentifiedTypeStream caching configuration.
-
-
Constructor Summary
Constructors Constructor Description CamelStreamCachingStrategyDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAnySpoolRules()StringgetBufferSize()StringgetEnabled()StringgetRemoveSpoolDirectoryWhenStopping()StringgetSpoolCipher()StringgetSpoolDirectory()StringgetSpoolRules()StringgetSpoolThreshold()StringgetSpoolUsedHeapMemoryLimit()StringgetSpoolUsedHeapMemoryThreshold()StringgetStatisticsEnabled()voidsetAnySpoolRules(String anySpoolRules)Sets whether if just any of theStreamCachingStrategy.SpoolRulerules returns true then shouldSpoolCache(long) returns true.voidsetBufferSize(String bufferSize)Sets the buffer size to use when allocating in-memory buffers used for in-memory stream caches.voidsetEnabled(String enabled)Sets whether the stream caching is enabled.voidsetRemoveSpoolDirectoryWhenStopping(String removeSpoolDirectoryWhenStopping)Whether to remove the temporary directory when stopping.voidsetSpoolCipher(String spoolCipher)Sets a cipher name to use when spooling to disk to write with encryption.voidsetSpoolDirectory(String spoolDirectory)Sets the spool (temporary) directory to use for overflow and spooling to disk.voidsetSpoolRules(String spoolRules)Reference to one or more customStreamCachingStrategy.SpoolRuleto use.voidsetSpoolThreshold(String spoolThreshold)Threshold in bytes when overflow to disk is activated.voidsetSpoolUsedHeapMemoryLimit(String spoolUsedHeapMemoryLimit)Sets what the upper bounds should be when spoolUsedHeapMemoryThreshold is in use.voidsetSpoolUsedHeapMemoryThreshold(String spoolUsedHeapMemoryThreshold)Sets a percentage (1-99) of used heap memory threshold to activate spooling to disk.voidsetStatisticsEnabled(String statisticsEnabled)Sets whether statistics is enabled.
-
-
-
Method Detail
-
getEnabled
public String getEnabled()
-
setEnabled
public void setEnabled(String enabled)
Sets whether the stream caching is enabled. Notice: This cannot be changed at runtime.
-
getSpoolDirectory
public String getSpoolDirectory()
-
setSpoolDirectory
public void setSpoolDirectory(String spoolDirectory)
Sets the spool (temporary) directory to use for overflow and spooling to disk. If no spool directory has been explicit configured, then a temporary directory is created in the java.io.tmpdir directory.
-
getSpoolCipher
public String getSpoolCipher()
-
setSpoolCipher
public void setSpoolCipher(String spoolCipher)
Sets a cipher name to use when spooling to disk to write with encryption. By default the data is not encrypted.
-
getSpoolThreshold
public String getSpoolThreshold()
-
setSpoolThreshold
public void setSpoolThreshold(String spoolThreshold)
Threshold in bytes when overflow to disk is activated. The default threshold isStreamCache.DEFAULT_SPOOL_THRESHOLDbytes (eg 128kb). Use -1 to disable overflow to disk.
-
getSpoolUsedHeapMemoryThreshold
public String getSpoolUsedHeapMemoryThreshold()
-
setSpoolUsedHeapMemoryThreshold
public void setSpoolUsedHeapMemoryThreshold(String spoolUsedHeapMemoryThreshold)
Sets a percentage (1-99) of used heap memory threshold to activate spooling to disk.
-
getSpoolUsedHeapMemoryLimit
public String getSpoolUsedHeapMemoryLimit()
-
setSpoolUsedHeapMemoryLimit
public void setSpoolUsedHeapMemoryLimit(String spoolUsedHeapMemoryLimit)
Sets what the upper bounds should be when spoolUsedHeapMemoryThreshold is in use.
-
getSpoolRules
public String getSpoolRules()
-
setSpoolRules
public void setSpoolRules(String spoolRules)
Reference to one or more customStreamCachingStrategy.SpoolRuleto use. Multiple rules can be separated by comma.
-
getBufferSize
public String getBufferSize()
-
setBufferSize
public void setBufferSize(String bufferSize)
Sets the buffer size to use when allocating in-memory buffers used for in-memory stream caches. The default size isIOHelper.DEFAULT_BUFFER_SIZE
-
getRemoveSpoolDirectoryWhenStopping
public String getRemoveSpoolDirectoryWhenStopping()
-
setRemoveSpoolDirectoryWhenStopping
public void setRemoveSpoolDirectoryWhenStopping(String removeSpoolDirectoryWhenStopping)
Whether to remove the temporary directory when stopping. This option is default true
-
getStatisticsEnabled
public String getStatisticsEnabled()
-
setStatisticsEnabled
public void setStatisticsEnabled(String statisticsEnabled)
Sets whether statistics is enabled.
-
getAnySpoolRules
public String getAnySpoolRules()
-
setAnySpoolRules
public void setAnySpoolRules(String anySpoolRules)
Sets whether if just any of theStreamCachingStrategy.SpoolRulerules returns true then shouldSpoolCache(long) returns true. If this option is false, then all theStreamCachingStrategy.SpoolRulemust return true. The default value is false which means that all the rules must return true.
-
-