public class DefaultStreamCachingStrategy
extends org.apache.camel.support.service.ServiceSupport
implements org.apache.camel.CamelContextAware, org.apache.camel.spi.StreamCachingStrategy
StreamCachingStrategy
Constructor and Description |
---|
DefaultStreamCachingStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
addSpoolRule(org.apache.camel.spi.StreamCachingStrategy.SpoolRule rule) |
org.apache.camel.StreamCache |
cache(org.apache.camel.Exchange exchange) |
protected String |
customResolveManagementName(String pattern) |
protected String |
defaultManagementName(String path) |
protected void |
doStart() |
protected void |
doStop() |
int |
getBufferSize() |
org.apache.camel.CamelContext |
getCamelContext() |
String |
getSpoolCipher() |
File |
getSpoolDirectory() |
long |
getSpoolThreshold() |
org.apache.camel.spi.StreamCachingStrategy.SpoolUsedHeapMemoryLimit |
getSpoolUsedHeapMemoryLimit() |
int |
getSpoolUsedHeapMemoryThreshold() |
org.apache.camel.spi.StreamCachingStrategy.Statistics |
getStatistics() |
boolean |
isAnySpoolRules() |
boolean |
isEnabled() |
boolean |
isRemoveSpoolDirectoryWhenStopping() |
protected String |
resolveSpoolDirectory(String path) |
void |
setAnySpoolRules(boolean anySpoolTasks) |
void |
setBufferSize(int bufferSize) |
void |
setCamelContext(org.apache.camel.CamelContext camelContext) |
void |
setEnabled(boolean enabled) |
void |
setRemoveSpoolDirectoryWhenStopping(boolean removeSpoolDirectoryWhenStopping) |
void |
setSpoolCipher(String spoolCipher) |
void |
setSpoolDirectory(File path) |
void |
setSpoolDirectory(String path) |
void |
setSpoolThreshold(long spoolThreshold) |
void |
setSpoolUsedHeapMemoryLimit(org.apache.camel.spi.StreamCachingStrategy.SpoolUsedHeapMemoryLimit spoolUsedHeapMemoryLimit) |
void |
setSpoolUsedHeapMemoryThreshold(int spoolHeapMemoryWatermarkThreshold) |
boolean |
shouldSpoolCache(long length) |
String |
toString() |
build, doBuild, doFail, doInit, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public org.apache.camel.CamelContext getCamelContext()
getCamelContext
in interface org.apache.camel.CamelContextAware
public void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext
in interface org.apache.camel.CamelContextAware
public boolean isEnabled()
isEnabled
in interface org.apache.camel.spi.StreamCachingStrategy
public void setEnabled(boolean enabled)
setEnabled
in interface org.apache.camel.spi.StreamCachingStrategy
public void setSpoolDirectory(String path)
setSpoolDirectory
in interface org.apache.camel.spi.StreamCachingStrategy
public void setSpoolDirectory(File path)
setSpoolDirectory
in interface org.apache.camel.spi.StreamCachingStrategy
public File getSpoolDirectory()
getSpoolDirectory
in interface org.apache.camel.spi.StreamCachingStrategy
public long getSpoolThreshold()
getSpoolThreshold
in interface org.apache.camel.spi.StreamCachingStrategy
public int getSpoolUsedHeapMemoryThreshold()
getSpoolUsedHeapMemoryThreshold
in interface org.apache.camel.spi.StreamCachingStrategy
public void setSpoolUsedHeapMemoryThreshold(int spoolHeapMemoryWatermarkThreshold)
setSpoolUsedHeapMemoryThreshold
in interface org.apache.camel.spi.StreamCachingStrategy
public org.apache.camel.spi.StreamCachingStrategy.SpoolUsedHeapMemoryLimit getSpoolUsedHeapMemoryLimit()
getSpoolUsedHeapMemoryLimit
in interface org.apache.camel.spi.StreamCachingStrategy
public void setSpoolUsedHeapMemoryLimit(org.apache.camel.spi.StreamCachingStrategy.SpoolUsedHeapMemoryLimit spoolUsedHeapMemoryLimit)
setSpoolUsedHeapMemoryLimit
in interface org.apache.camel.spi.StreamCachingStrategy
public void setSpoolThreshold(long spoolThreshold)
setSpoolThreshold
in interface org.apache.camel.spi.StreamCachingStrategy
public String getSpoolCipher()
getSpoolCipher
in interface org.apache.camel.spi.StreamCachingStrategy
public void setSpoolCipher(String spoolCipher)
setSpoolCipher
in interface org.apache.camel.spi.StreamCachingStrategy
public int getBufferSize()
getBufferSize
in interface org.apache.camel.spi.StreamCachingStrategy
public void setBufferSize(int bufferSize)
setBufferSize
in interface org.apache.camel.spi.StreamCachingStrategy
public boolean isRemoveSpoolDirectoryWhenStopping()
isRemoveSpoolDirectoryWhenStopping
in interface org.apache.camel.spi.StreamCachingStrategy
public void setRemoveSpoolDirectoryWhenStopping(boolean removeSpoolDirectoryWhenStopping)
setRemoveSpoolDirectoryWhenStopping
in interface org.apache.camel.spi.StreamCachingStrategy
public boolean isAnySpoolRules()
isAnySpoolRules
in interface org.apache.camel.spi.StreamCachingStrategy
public void setAnySpoolRules(boolean anySpoolTasks)
setAnySpoolRules
in interface org.apache.camel.spi.StreamCachingStrategy
public org.apache.camel.spi.StreamCachingStrategy.Statistics getStatistics()
getStatistics
in interface org.apache.camel.spi.StreamCachingStrategy
public boolean shouldSpoolCache(long length)
shouldSpoolCache
in interface org.apache.camel.spi.StreamCachingStrategy
public void addSpoolRule(org.apache.camel.spi.StreamCachingStrategy.SpoolRule rule)
addSpoolRule
in interface org.apache.camel.spi.StreamCachingStrategy
public org.apache.camel.StreamCache cache(org.apache.camel.Exchange exchange)
cache
in interface org.apache.camel.spi.StreamCachingStrategy
protected void doStart() throws Exception
doStart
in class org.apache.camel.support.service.BaseService
Exception
protected void doStop() throws Exception
doStop
in class org.apache.camel.support.service.BaseService
Exception
Apache Camel