Author: buildbot Date: Sat Feb 14 14:20:35 2015 New Revision: 940148 Log: Production update by buildbot for camel
Modified: websites/production/camel/content/book-component-appendix.html websites/production/camel/content/book-in-one-page.html websites/production/camel/content/cache.html websites/production/camel/content/cache/main.pageCache websites/production/camel/content/camel-2150-release.html Modified: websites/production/camel/content/book-component-appendix.html ============================================================================== --- websites/production/camel/content/book-component-appendix.html (original) +++ websites/production/camel/content/book-component-appendix.html Sat Feb 14 14:20:35 2015 @@ -767,31 +767,14 @@ browse:someName[?options] </div></div><h3 id="BookComponentAppendix-URIformat.5">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[cache://cacheName[?options] ]]></script> -</div></div><p>You can append query options to the URI in the following format, <code>?option=value&option=#beanRef&...</code></p><h3 id="BookComponentAppendix-Options.3">Options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default Value </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>maxElementsInMemory</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>1000</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The number of elements that may be stored in the defined cache </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>memoryStoreEvictionPolicy</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>MemoryStoreEvictionPolicy.LFU</code> </p></td ><td colspan="1" rowspan="1" class="confluenceTd"><p> The number of elements >that may be stored in the defined cache. Options include</p> -<ul class="alternate"><li>MemoryStoreEvictionPolicy.LFU - Least frequently used</li><li>MemoryStoreEvictionPolicy.LRU - Least recently used</li><li>MemoryStoreEvictionPolicy.FIFO - first in first out, the oldest element by creation time</li></ul> -</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>overflowToDisk</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies whether cache may overflow to disk </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>eternal</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Sets whether elements are eternal. If eternal, timeouts are ignored and the<br clear="none" class="atl-forced-newline"> - element never expires. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>timeToLiveSeconds</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>300</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The maximum time between creation time and when an element expires.<br clear="none" class="atl-forced-newline"> - Is used only if the element is not eternal </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>timeToIdleSeconds</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>300</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The maximum amount of time between accesses before an element expires </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>diskPersistent</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether the disk store persists between restarts of the Virtual Machine. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>diskExpiryThreadIntervalSeconds</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>120</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The number of seconds between runs of the disk expiry thread. </p></ td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cacheManagerFactory</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8:</strong> If you want to use a custom factory which instantiates and creates the EHCache <code>net.sf.ehcache.CacheManager</code>. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> abstract org.apache.camel.component.cache.CacheManagerFactory </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>eventListenerRegistry</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8:</strong> Sets a list of EHCache <code>net.sf.ehcache.event.CacheEventListener</code> for all new caches- no need to define it per cache in EHCache xml config anymore. <br c lear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> org.apache.camel.component.cache.CacheEventListenerRegistry </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cacheLoaderRegistry</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8:</strong> Sets a list of <code>org.apache.camel.component.cache.CacheLoaderWrapper</code> that extends EHCache <code>net.sf.ehcache.loader.CacheLoader</code> for all new caches- no need to define it per cache in EHCache xml config anymore. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> org.apache.camel.component.cache.CacheLoaderRegistry </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>key</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p ></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel >2.10:</strong> To configure using a cache key by default. If a key is >provided in the message header, then the key from the header takes >precedence. </p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p> <code>operation</code> </p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.10:</strong> >To configure using an cache operation by default. If an operation in the >message header, then the operation from the header takes precedence. ></p></td></tr></tbody></table></div> -<h3 id="BookComponentAppendix-CacheComponentoptions">Cache Component options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default Value </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>configuration</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> To use a custom <code>org.apache.camel.component.cache.CacheConfiguration</code> configuration. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cacheManagerFactory</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> To use a custom <code>org.apache.camel.component.cache.CacheManagerFactory</code>. </p ></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> ><code>configurationFile</code> </p></td><td colspan="1" rowspan="1" >class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" >class="confluenceTd"><p> <strong>Camel 2.13/2.12.3:</strong> To configure the >location of the <code>ehcache.xml</code> file to use, such as ><code>classpath:com/foo/mycache.xml</code> to load from classpath. If no >configuration is given, then the default settings from EHCache is used. ></p></td></tr></tbody></table></div> -<h3 id="BookComponentAppendix-Sending/ReceivingMessagesto/fromthecache"><span style="line-height: 1.5625;">Sending/Receiving Messages to/from the cache</span></h3><h4 id="BookComponentAppendix-MessageHeadersuptoCamel2.7">Message Headers up to Camel 2.7</h4><div class="confluenceTableSmall"> -<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Header </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CACHE_OPERATION</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The operation to be performed on the cache. Valid options are</p> -<ul class="alternate"><li>GET</li><li>CHECK</li><li>ADD</li><li>UPDATE</li><li>DELETE</li><li>DELETEALL<br clear="none" class="atl-forced-newline"> -<code>GET</code> and <code>CHECK</code> requires <strong>Camel 2.3</strong> onwards. </li></ul> -</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CACHE_KEY</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The cache key used to store the Message in the cache. The cache key is optional if the CACHE_OPERATION is DELETEALL </p></td></tr></tbody></table></div> -</div><h4 id="BookComponentAppendix-MessageHeadersCamel2.8+">Message Headers Camel 2.8+</h4> <div class="aui-message hint shadowed information-macro"> +</div></div><p>You can append query options to the URI in the following format, <code>?option=value&option=#beanRef&...</code></p><h3 id="BookComponentAppendix-Options.3">Options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maxElementsInMemory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of elements that may be stored in the defined cache</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>memoryStoreEvictionPolicy</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MemoryStoreEvictionPolicy.LFU</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of elements that may be stored in the defined cache. Options include</p><ul class="alternate"><li>MemoryStoreEvictionPolicy.LFU - Least frequently used</li><li>MemoryStoreEvictionPolicy.LRU - Least recently used</li><li>MemoryStoreEvictionPolicy.FIFO - first in first out, the oldest element by creation time</li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>overflowToDisk</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies whether cache may overflow to disk</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>eternal</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets whether elements are eternal. If eternal, timeouts are ignored and the<br clear="none" class="atl-forced-newline"> eleme nt never expires.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>timeToLiveSeconds</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>300</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The maximum time between creation time and when an element expires.<br clear="none" class="atl-forced-newline"> Is used only if the element is not eternal</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>timeToIdleSeconds</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>300</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The maximum amount of time between accesses before an element expires</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>diskPersistent</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether the disk store persists between rest arts of the Virtual Machine.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>diskExpiryThreadIntervalSeconds</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>120</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of seconds between runs of the disk expiry thread.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cacheManagerFactory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> If you want to use a custom factory which instantiates and creates the EHCache <code>net.sf.ehcache.CacheManager</code>. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> abstract org.apache.camel.component.cache.CacheManagerFactory</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>eventListenerRegistry</c ode></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Sets a list of EHCache <code>net.sf.ehcache.event.CacheEventListener</code> for all new caches- no need to define it per cache in EHCache xml config anymore. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> org.apache.camel.component.cache.CacheEventListenerRegistry</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cacheLoaderRegistry</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Sets a list of <code>org.apache.camel.component.cache.CacheLoaderWrapper</code> that extends EHCache <code>net.sf.ehcache.loader.CacheLoader</code> for all new caches- no need to define it per cache in EHCache xml config anymore. <br c lear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> org.apache.camel.component.cache.CacheLoaderRegistry</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>key</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> To configure using a cache key by default. If a key is provided in the message header, then the key from the header takes precedence.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>operation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> To configure using an cache operation by default. If an operation in the message header, then the operation from the header takes precedence.</p></td></tr><tr><td colspan="1" rowspan="1" class="conf luenceTd"><code>objectCache</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15:</strong> Whether to turn on allowing to store non serializable objects in the cache. If this option is enabled then overflow to disk cannot be enabled as well.</td></tr></tbody></table></div><h3 id="BookComponentAppendix-CacheComponentoptions">Cache Component options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>configuration</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a custom <code>org.apache.camel.component.cach e.CacheConfiguration</code> configuration.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cacheManagerFactory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a custom <code>org.apache.camel.component.cache.CacheManagerFactory</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>configurationFile</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.13/2.12.3:</strong> To configure the location of the <code>ehcache.xml</code> file to use, such as <code>classpath:com/foo/mycache.xml</code> to load from classpath. If no configuration is given, then the default settings from EHCache is used.</p></td></tr></tbody></table></div><h3 id="BookComponentAppendix-Sending/ReceivingMessagesto/fromthecache"><span style="line-height: 1.5625;">Sending/Recei ving Messages to/from the cache</span></h3><h4 id="BookComponentAppendix-MessageHeadersuptoCamel2.7">Message Headers up to Camel 2.7</h4><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CACHE_OPERATION</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The operation to be performed on the cache. Valid options are</p><ul class="alternate"><li>GET</li><li>CHECK</li><li>ADD</li><li>UPDATE</li><li>DELETE</li><li>DELETEALL<br clear="none" class="atl-forced-newline"> <code>GET</code> and <code>CHECK</code> requires <strong>Camel 2.3</strong> onwards.</li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CACHE_KEY</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The cache key u sed to store the Message in the cache. The cache key is optional if the CACHE_OPERATION is DELETEALL</p></td></tr></tbody></table></div></div><h4 id="BookComponentAppendix-MessageHeadersCamel2.8+">Message Headers Camel 2.8+</h4> <div class="aui-message hint shadowed information-macro"> <p class="title">Header changes in Camel 2.8</p> <span class="aui-icon icon-hint">Icon</span> <div class="message-content"> <p>The header names and supported values have changed to be prefixed with 'CamelCache' and use mixed case. This makes them easier to identify and keep separate from other headers. The CacheConstants variable names remain unchanged, just their values have been changed. Also, these headers are now removed from the exchange after the cache operation is performed.</p> </div> </div> -<div class="confluenceTableSmall"> -<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Header </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelCacheOperation</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The operation to be performed on the cache. The valid options are</p> -<ul class="alternate"><li>CamelCacheGet</li><li>CamelCacheCheck</li><li>CamelCacheAdd</li><li>CamelCacheUpdate</li><li>CamelCacheDelete</li><li>CamelCacheDeleteAll</li></ul> -</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelCacheKey</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The cache key used to store the Message in the cache. The cache key is optional if the CamelCacheOperation is CamelCacheDeleteAll </p></td></tr></tbody></table></div> -</div><p>The <code>CamelCacheAdd</code> and <code>CamelCacheUpdate</code> operations support additional headers:</p><div class="confluenceTableSmall"> -<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Header </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Type </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelCacheTimeToLive</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>Integer</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> Time to live in seconds. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelCacheTimeToIdle</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>Integer</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> Time to idle in seconds. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelCacheEternal</code> </p></td><td colspa n="1" rowspan="1" class="confluenceTd"><p> <code>Boolean</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> Whether the content is eternal. </p></td></tr></tbody></table></div> -</div><h4 id="BookComponentAppendix-CacheProducer">Cache Producer</h4><p>Sending data to the cache involves the ability to direct payloads in exchanges to be stored in a pre-existing or created-on-demand cache. The mechanics of doing this involve</p><ul class="alternate"><li>setting the Message Exchange Headers shown above.</li><li>ensuring that the Message Exchange Body contains the message directed to the cache</li></ul><h4 id="BookComponentAppendix-CacheConsumer">Cache Consumer</h4><p>Receiving data from the cache involves the ability of the CacheConsumer to listen on a pre-existing or created-on-demand Cache using an event Listener and receive automatic notifications when any cache activity take place (i.e CamelCacheGet/CamelCacheUpdate/CamelCacheDelete/CamelCacheDeleteAll). Upon such an activity taking place</p><ul class="alternate"><li>an exchange containing Message Exchange Headers and a Message Exchange Body containing the just added/updated payload is placed and sent.</li>< li>in case of a CamelCacheDeleteAll operation, the Message Exchange Header CamelCacheKey and the Message Exchange Body are not populated.</li></ul><h4 id="BookComponentAppendix-CacheProcessors">Cache Processors</h4><p>There are a set of nice processors with the ability to perform cache lookups and selectively replace payload content at the</p><ul class="alternate"><li>body</li><li>token</li><li>xpath level</li></ul><h3 id="BookComponentAppendix-CacheUsageSamples">Cache Usage Samples</h3><h4 id="BookComponentAppendix-Example1:Configuringthecache">Example 1: Configuring the cache</h4><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelCacheOperation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The operation to be performed on the cache. The valid options are</p><ul class="alternate"><li>CamelCacheGet</li><li>CamelCacheCheck</li><li>CamelCacheAdd</li><li>CamelCacheUpdate</li><li>CamelCacheDelete</li><li>CamelCacheDeleteAll</li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelCacheKey</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The cache key used to store the Message in the cache. The cache key is optional if the CamelCacheOperation is CamelCacheDeleteAll</p></td></tr></tbody></table></div></div><p>The <code>CamelCacheAdd</code> and <code>CamelCacheUpdate</code> operations support additional headers:</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelCacheTimeToLive</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Integer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> Time to live in seconds.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelCacheTimeToIdle</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Integer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> Time to idle in seconds.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelCacheEternal</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> Whether the content is eternal.</p></td></tr></tbody></table></div></div><h4 id="BookComponentAppendix-CacheProducer">Cache Producer</h4><p>Sending data to the cache involves the ability to direct payloads in exchanges to be stored in a pre-existing or created-on-demand cache. The mechanics of doing this involve</p><ul class="alternate"><li>setting the Message Exchange Headers shown above.</li><li>ensuring that the Message Exchange Body contains the message directed to the cache</li></ul><h4 id="BookComponentAppendix-CacheConsumer">Cache Consumer</h4><p>Receiving data from the cache involves the ability of the CacheConsumer to listen on a pre-existing or created-on-demand Cache using an event Listener and receive automatic notifications when any cach e activity take place (i.e CamelCacheGet/CamelCacheUpdate/CamelCacheDelete/CamelCacheDeleteAll). Upon such an activity taking place</p><ul class="alternate"><li>an exchange containing Message Exchange Headers and a Message Exchange Body containing the just added/updated payload is placed and sent.</li><li>in case of a CamelCacheDeleteAll operation, the Message Exchange Header CamelCacheKey and the Message Exchange Body are not populated.</li></ul><h4 id="BookComponentAppendix-CacheProcessors">Cache Processors</h4><p>There are a set of nice processors with the ability to perform cache lookups and selectively replace payload content at the</p><ul class="alternate"><li>body</li><li>token</li><li>xpath level</li></ul><h3 id="BookComponentAppendix-CacheUsageSamples">Cache Usage Samples</h3><h4 id="BookComponentAppendix-Example1:Configuringthecache">Example 1: Configuring the cache</h4><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from("cache://MyApplicationCache" + "?maxElementsInMemory=1000" + "&memoryStoreEvictionPolicy=" + @@ -1342,11 +1325,11 @@ template.send("direct:alias-verify& </div> </div> <p>The <strong>cxf:</strong> component provides integration with <a shape="rect" href="http://cxf.apache.org">Apache CXF</a> for connecting to JAX-WS services hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1423837082303 {padding: 0px;} -div.rbtoc1423837082303 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1423837082303 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1423923473646 {padding: 0px;} +div.rbtoc1423923473646 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1423923473646 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1423837082303"> +/*]]>*/</style></p><div class="toc-macro rbtoc1423923473646"> <ul class="toc-indentation"><li><a shape="rect" href="#CXF-CXFComponent">CXF Component</a> <ul class="toc-indentation"><li><a shape="rect" href="#CXF-URIformat">URI format</a></li><li><a shape="rect" href="#CXF-Options">Options</a> <ul class="toc-indentation"><li><a shape="rect" href="#CXF-Thedescriptionsofthedataformats">The descriptions of the dataformats</a> Modified: websites/production/camel/content/book-in-one-page.html ============================================================================== --- websites/production/camel/content/book-in-one-page.html (original) +++ websites/production/camel/content/book-in-one-page.html Sat Feb 14 14:20:35 2015 @@ -4125,11 +4125,11 @@ While not actual tutorials you might fin </div> </div> <h2 id="BookInOnePage-Preface">Preface</h2><p>This tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a <a shape="rect" class="external-link" href="http://www.springramework.org" rel="nofollow">Spring</a> service. The route works in a synchronous fashion returning a response to the client.</p><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1423837153728 {padding: 0px;} -div.rbtoc1423837153728 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1423837153728 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1423923519196 {padding: 0px;} +div.rbtoc1423923519196 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1423923519196 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1423837153728"> +/*]]>*/</style></p><div class="toc-macro rbtoc1423923519196"> <ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-JmsRemoting-TutorialonSpringRemotingwithJMS">Tutorial on Spring Remoting with JMS</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-Preface">Preface</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-Distribution">Distribution</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-About">About</a></li><li><a shape="rect" href="#Tutorial-JmsRemoting-CreatetheCamelProject">Create the Camel Project</a> <ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-JmsRemoting-UpdatethePOMwithDependencies">Update the POM with Dependencies</a></li></ul> </li><li><a shape="rect" href="#Tutorial-JmsRemoting-WritingtheServer">Writing the Server</a> @@ -6315,11 +6315,11 @@ So we completed the last piece in the pi <style type="text/css">/*<![CDATA[*/ -div.rbtoc1423837156480 {padding: 0px;} -div.rbtoc1423837156480 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1423837156480 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1423923522291 {padding: 0px;} +div.rbtoc1423923522291 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1423923522291 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style><div class="toc-macro rbtoc1423837156480"> +/*]]>*/</style><div class="toc-macro rbtoc1423923522291"> <ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-AXIS-Camel-TutorialusingAxis1.4withApacheCamel">Tutorial using Axis 1.4 with Apache Camel</a> <ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-AXIS-Camel-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-Distribution">Distribution</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-Introduction">Introduction</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-SettinguptheprojecttorunAxis">Setting up the project to run Axis</a> <ul class="toc-indentation"><li><a shape="rect" href="#Tutorial-AXIS-Camel-Maven2">Maven 2</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-wsdl">wsdl</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-ConfiguringAxis">Configuring Axis</a></li><li><a shape="rect" href="#Tutorial-AXIS-Camel-RunningtheExample">Running the Example</a></li></ul> @@ -18284,31 +18284,14 @@ browse:someName[?options] </div></div><h3 id="BookInOnePage-URIformat.6">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[cache://cacheName[?options] ]]></script> -</div></div><p>You can append query options to the URI in the following format, <code>?option=value&option=#beanRef&...</code></p><h3 id="BookInOnePage-Options.24">Options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default Value </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>maxElementsInMemory</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>1000</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The number of elements that may be stored in the defined cache </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>memoryStoreEvictionPolicy</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>MemoryStoreEvictionPolicy.LFU</code> </p></td><td co lspan="1" rowspan="1" class="confluenceTd"><p> The number of elements that may be stored in the defined cache. Options include</p> -<ul class="alternate"><li>MemoryStoreEvictionPolicy.LFU - Least frequently used</li><li>MemoryStoreEvictionPolicy.LRU - Least recently used</li><li>MemoryStoreEvictionPolicy.FIFO - first in first out, the oldest element by creation time</li></ul> -</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>overflowToDisk</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies whether cache may overflow to disk </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>eternal</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Sets whether elements are eternal. If eternal, timeouts are ignored and the<br clear="none" class="atl-forced-newline"> - element never expires. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>timeToLiveSeconds</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>300</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The maximum time between creation time and when an element expires.<br clear="none" class="atl-forced-newline"> - Is used only if the element is not eternal </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>timeToIdleSeconds</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>300</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The maximum amount of time between accesses before an element expires </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>diskPersistent</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether the disk store persists between restarts of the Virtual Machine. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>diskExpiryThreadIntervalSeconds</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>120</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The number of seconds between runs of the disk expiry thread. </p></ td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cacheManagerFactory</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8:</strong> If you want to use a custom factory which instantiates and creates the EHCache <code>net.sf.ehcache.CacheManager</code>. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> abstract org.apache.camel.component.cache.CacheManagerFactory </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>eventListenerRegistry</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8:</strong> Sets a list of EHCache <code>net.sf.ehcache.event.CacheEventListener</code> for all new caches- no need to define it per cache in EHCache xml config anymore. <br c lear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> org.apache.camel.component.cache.CacheEventListenerRegistry </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cacheLoaderRegistry</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8:</strong> Sets a list of <code>org.apache.camel.component.cache.CacheLoaderWrapper</code> that extends EHCache <code>net.sf.ehcache.loader.CacheLoader</code> for all new caches- no need to define it per cache in EHCache xml config anymore. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> org.apache.camel.component.cache.CacheLoaderRegistry </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>key</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p ></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel >2.10:</strong> To configure using a cache key by default. If a key is >provided in the message header, then the key from the header takes >precedence. </p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p> <code>operation</code> </p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.10:</strong> >To configure using an cache operation by default. If an operation in the >message header, then the operation from the header takes precedence. ></p></td></tr></tbody></table></div> -<h3 id="BookInOnePage-CacheComponentoptions">Cache Component options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default Value </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>configuration</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> To use a custom <code>org.apache.camel.component.cache.CacheConfiguration</code> configuration. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cacheManagerFactory</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> To use a custom <code>org.apache.camel.component.cache.CacheManagerFactory</code>. </p></td></ tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>configurationFile</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.13/2.12.3:</strong> To configure the location of the <code>ehcache.xml</code> file to use, such as <code>classpath:com/foo/mycache.xml</code> to load from classpath. If no configuration is given, then the default settings from EHCache is used. </p></td></tr></tbody></table></div> -<h3 id="BookInOnePage-Sending/ReceivingMessagesto/fromthecache"><span style="line-height: 1.5625;">Sending/Receiving Messages to/from the cache</span></h3><h4 id="BookInOnePage-MessageHeadersuptoCamel2.7">Message Headers up to Camel 2.7</h4><div class="confluenceTableSmall"> -<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Header </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CACHE_OPERATION</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The operation to be performed on the cache. Valid options are</p> -<ul class="alternate"><li>GET</li><li>CHECK</li><li>ADD</li><li>UPDATE</li><li>DELETE</li><li>DELETEALL<br clear="none" class="atl-forced-newline"> -<code>GET</code> and <code>CHECK</code> requires <strong>Camel 2.3</strong> onwards. </li></ul> -</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CACHE_KEY</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The cache key used to store the Message in the cache. The cache key is optional if the CACHE_OPERATION is DELETEALL </p></td></tr></tbody></table></div> -</div><h4 id="BookInOnePage-MessageHeadersCamel2.8+">Message Headers Camel 2.8+</h4> <div class="aui-message hint shadowed information-macro"> +</div></div><p>You can append query options to the URI in the following format, <code>?option=value&option=#beanRef&...</code></p><h3 id="BookInOnePage-Options.24">Options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maxElementsInMemory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of elements that may be stored in the defined cache</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>memoryStoreEvictionPolicy</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MemoryStoreEvictionPolicy.LFU</code></p></td><td colspan="1" rowspa n="1" class="confluenceTd"><p>The number of elements that may be stored in the defined cache. Options include</p><ul class="alternate"><li>MemoryStoreEvictionPolicy.LFU - Least frequently used</li><li>MemoryStoreEvictionPolicy.LRU - Least recently used</li><li>MemoryStoreEvictionPolicy.FIFO - first in first out, the oldest element by creation time</li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>overflowToDisk</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies whether cache may overflow to disk</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>eternal</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets whether elements are eternal. If eternal, timeouts are ignored and the<br clear="none" class="atl-forced-newline"> element neve r expires.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>timeToLiveSeconds</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>300</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The maximum time between creation time and when an element expires.<br clear="none" class="atl-forced-newline"> Is used only if the element is not eternal</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>timeToIdleSeconds</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>300</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The maximum amount of time between accesses before an element expires</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>diskPersistent</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether the disk store persists between restarts of the Virtual Machine.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>diskExpiryThreadIntervalSeconds</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>120</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of seconds between runs of the disk expiry thread.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cacheManagerFactory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> If you want to use a custom factory which instantiates and creates the EHCache <code>net.sf.ehcache.CacheManager</code>. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> abstract org.apache.camel.component.cache.CacheManagerFactory</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>eventListenerRegistry</code></p ></td><td colspan="1" rowspan="1" >class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" >class="confluenceTd"><p><strong>Camel 2.8:</strong> Sets a list of EHCache ><code>net.sf.ehcache.event.CacheEventListener</code> for all new caches- no >need to define it per cache in EHCache xml config anymore. <br clear="none" >class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> ><em>Type:</em> >org.apache.camel.component.cache.CacheEventListenerRegistry</p></td></tr><tr><td > colspan="1" rowspan="1" >class="confluenceTd"><p><code>cacheLoaderRegistry</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> >Sets a list of ><code>org.apache.camel.component.cache.CacheLoaderWrapper</code> that extends >EHCache <code>net.sf.ehcache.loader.CacheLoader</code> for all new caches- no >need to define it per cache in EHCache xml config anymore. <br clear="n one" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> org.apache.camel.component.cache.CacheLoaderRegistry</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>key</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> To configure using a cache key by default. If a key is provided in the message header, then the key from the header takes precedence.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>operation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> To configure using an cache operation by default. If an operation in the message header, then the operation from the header takes precedence.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceT d"><code>objectCache</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15:</strong> Whether to turn on allowing to store non serializable objects in the cache. If this option is enabled then overflow to disk cannot be enabled as well.</td></tr></tbody></table></div><h3 id="BookInOnePage-CacheComponentoptions">Cache Component options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>configuration</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a custom <code>org.apache.camel.component.cache.CacheConfigur ation</code> configuration.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cacheManagerFactory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a custom <code>org.apache.camel.component.cache.CacheManagerFactory</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>configurationFile</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.13/2.12.3:</strong> To configure the location of the <code>ehcache.xml</code> file to use, such as <code>classpath:com/foo/mycache.xml</code> to load from classpath. If no configuration is given, then the default settings from EHCache is used.</p></td></tr></tbody></table></div><h3 id="BookInOnePage-Sending/ReceivingMessagesto/fromthecache"><span style="line-height: 1.5625;">Sending/Receiving Messages to/from t he cache</span></h3><h4 id="BookInOnePage-MessageHeadersuptoCamel2.7">Message Headers up to Camel 2.7</h4><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CACHE_OPERATION</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The operation to be performed on the cache. Valid options are</p><ul class="alternate"><li>GET</li><li>CHECK</li><li>ADD</li><li>UPDATE</li><li>DELETE</li><li>DELETEALL<br clear="none" class="atl-forced-newline"> <code>GET</code> and <code>CHECK</code> requires <strong>Camel 2.3</strong> onwards.</li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CACHE_KEY</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The cache key used to store the Message in the cache. The cache key is optional if the CACHE_OPERATION is DELETEALL</p></td></tr></tbody></table></div></div><h4 id="BookInOnePage-MessageHeadersCamel2.8+">Message Headers Camel 2.8+</h4> <div class="aui-message hint shadowed information-macro"> <p class="title">Header changes in Camel 2.8</p> <span class="aui-icon icon-hint">Icon</span> <div class="message-content"> <p>The header names and supported values have changed to be prefixed with 'CamelCache' and use mixed case. This makes them easier to identify and keep separate from other headers. The CacheConstants variable names remain unchanged, just their values have been changed. Also, these headers are now removed from the exchange after the cache operation is performed.</p> </div> </div> -<div class="confluenceTableSmall"> -<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Header </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelCacheOperation</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The operation to be performed on the cache. The valid options are</p> -<ul class="alternate"><li>CamelCacheGet</li><li>CamelCacheCheck</li><li>CamelCacheAdd</li><li>CamelCacheUpdate</li><li>CamelCacheDelete</li><li>CamelCacheDeleteAll</li></ul> -</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelCacheKey</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The cache key used to store the Message in the cache. The cache key is optional if the CamelCacheOperation is CamelCacheDeleteAll </p></td></tr></tbody></table></div> -</div><p>The <code>CamelCacheAdd</code> and <code>CamelCacheUpdate</code> operations support additional headers:</p><div class="confluenceTableSmall"> -<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Header </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Type </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelCacheTimeToLive</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>Integer</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> Time to live in seconds. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelCacheTimeToIdle</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>Integer</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> Time to idle in seconds. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelCacheEternal</code> </p></td><td colspa n="1" rowspan="1" class="confluenceTd"><p> <code>Boolean</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> Whether the content is eternal. </p></td></tr></tbody></table></div> -</div><h4 id="BookInOnePage-CacheProducer">Cache Producer</h4><p>Sending data to the cache involves the ability to direct payloads in exchanges to be stored in a pre-existing or created-on-demand cache. The mechanics of doing this involve</p><ul class="alternate"><li>setting the Message Exchange Headers shown above.</li><li>ensuring that the Message Exchange Body contains the message directed to the cache</li></ul><h4 id="BookInOnePage-CacheConsumer">Cache Consumer</h4><p>Receiving data from the cache involves the ability of the CacheConsumer to listen on a pre-existing or created-on-demand Cache using an event Listener and receive automatic notifications when any cache activity take place (i.e CamelCacheGet/CamelCacheUpdate/CamelCacheDelete/CamelCacheDeleteAll). Upon such an activity taking place</p><ul class="alternate"><li>an exchange containing Message Exchange Headers and a Message Exchange Body containing the just added/updated payload is placed and sent.</li><li>in case of a CamelCacheDeleteAll operation, the Message Exchange Header CamelCacheKey and the Message Exchange Body are not populated.</li></ul><h4 id="BookInOnePage-CacheProcessors">Cache Processors</h4><p>There are a set of nice processors with the ability to perform cache lookups and selectively replace payload content at the</p><ul class="alternate"><li>body</li><li>token</li><li>xpath level</li></ul><h3 id="BookInOnePage-CacheUsageSamples">Cache Usage Samples</h3><h4 id="BookInOnePage-Example1:Configuringthecache">Example 1: Configuring the cache</h4><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelCacheOperation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The operation to be performed on the cache. The valid options are</p><ul class="alternate"><li>CamelCacheGet</li><li>CamelCacheCheck</li><li>CamelCacheAdd</li><li>CamelCacheUpdate</li><li>CamelCacheDelete</li><li>CamelCacheDeleteAll</li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelCacheKey</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The cache key used to store the Message in the cache. The cache key is optional if the CamelCacheOperation is CamelCacheDeleteAll</p></td></tr></tbody></table></div></div><p>The <code>CamelCacheAdd</code> and <code>CamelCacheUpdate</code> operations support additional headers:</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelCacheTimeToLive</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Integer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> Time to live in seconds.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelCacheTimeToIdle</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Integer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> Time to idle in seconds.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelCacheEternal</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> Whether the content is eternal.</p></td></tr></tbody></table></div></div><h4 id="BookInOnePage-CacheProducer">Cache Producer</h4><p>Sending data to the cache involves the ability to direct payloads in exchanges to be stored in a pre-existing or created-on-demand cache. The mechanics of doing this involve</p><ul class="alternate"><li>setting the Message Exchange Headers shown above.</li><li>ensuring that the Message Exchange Body contains the message directed to the cache</li></ul><h4 id="BookInOnePage-CacheConsumer">Cache Consumer</h4><p>Receiving data from the cache involves the ability of the CacheConsumer to listen on a pre-existing or created-on-demand Cache using an event Listener and receive automatic notifications when any cache activity take place (i.e CamelCacheGet/CamelCacheUpdate/CamelCacheDelete/CamelCacheDeleteAll). Upon such an activity taking place</p><ul class="alternate"><li>an exchange containing Message Exchange Headers and a Message Exchange Body containing the just added/updated payload is placed and sent.</li><li>in case of a CamelCacheDeleteAll operation, the Message Exchange Header CamelCacheKey and the Message Exchange Body are not populated.</li></ul><h4 id="BookInOnePage-CacheProcessors">Cache Processors</h4><p>There are a set of nice processors with the ability to perform cache lookups and selectively replace payload content at the</p><ul class="alternate"><li>body</li><li>token</li><li>xpath level</li></ul><h3 id="BookInOnePage-CacheUsageSamples">Cache Usage Samples</h3><h4 id="BookInOnePage-Example1:Configuringthecache">Example 1: Configuring the cache</h4><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from("cache://MyApplicationCache" + "?maxElementsInMemory=1000" + "&memoryStoreEvictionPolicy=" + @@ -18859,11 +18842,11 @@ template.send("direct:alias-verify& </div> </div> <p>The <strong>cxf:</strong> component provides integration with <a shape="rect" href="http://cxf.apache.org">Apache CXF</a> for connecting to JAX-WS services hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/ -div.rbtoc1423837216541 {padding: 0px;} -div.rbtoc1423837216541 ul {list-style: disc;margin-left: 0px;} -div.rbtoc1423837216541 li {margin-left: 0px;padding-left: 0px;} +div.rbtoc1423923553588 {padding: 0px;} +div.rbtoc1423923553588 ul {list-style: disc;margin-left: 0px;} +div.rbtoc1423923553588 li {margin-left: 0px;padding-left: 0px;} -/*]]>*/</style></p><div class="toc-macro rbtoc1423837216541"> +/*]]>*/</style></p><div class="toc-macro rbtoc1423923553588"> <ul class="toc-indentation"><li><a shape="rect" href="#CXF-CXFComponent">CXF Component</a> <ul class="toc-indentation"><li><a shape="rect" href="#CXF-URIformat">URI format</a></li><li><a shape="rect" href="#CXF-Options">Options</a> <ul class="toc-indentation"><li><a shape="rect" href="#CXF-Thedescriptionsofthedataformats">The descriptions of the dataformats</a> Modified: websites/production/camel/content/cache.html ============================================================================== --- websites/production/camel/content/cache.html (original) +++ websites/production/camel/content/cache.html Sat Feb 14 14:20:35 2015 @@ -96,31 +96,14 @@ </div></div><h3 id="Cache-URIformat">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[cache://cacheName[?options] ]]></script> -</div></div><p>You can append query options to the URI in the following format, <code>?option=value&option=#beanRef&...</code></p><h3 id="Cache-Options">Options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default Value </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>maxElementsInMemory</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>1000</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The number of elements that may be stored in the defined cache </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>memoryStoreEvictionPolicy</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>MemoryStoreEvictionPolicy.LFU</code> </p></td><td colspan="1" r owspan="1" class="confluenceTd"><p> The number of elements that may be stored in the defined cache. Options include</p> -<ul class="alternate"><li>MemoryStoreEvictionPolicy.LFU - Least frequently used</li><li>MemoryStoreEvictionPolicy.LRU - Least recently used</li><li>MemoryStoreEvictionPolicy.FIFO - first in first out, the oldest element by creation time</li></ul> -</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>overflowToDisk</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>true</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Specifies whether cache may overflow to disk </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>eternal</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Sets whether elements are eternal. If eternal, timeouts are ignored and the<br clear="none" class="atl-forced-newline"> - element never expires. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>timeToLiveSeconds</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>300</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The maximum time between creation time and when an element expires.<br clear="none" class="atl-forced-newline"> - Is used only if the element is not eternal </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>timeToIdleSeconds</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>300</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The maximum amount of time between accesses before an element expires </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>diskPersistent</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>false</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Whether the disk store persists between restarts of the Virtual Machine. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>diskExpiryThreadIntervalSeconds</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>120</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The number of seconds between runs of the disk expiry thread. </p></ td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cacheManagerFactory</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8:</strong> If you want to use a custom factory which instantiates and creates the EHCache <code>net.sf.ehcache.CacheManager</code>. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> abstract org.apache.camel.component.cache.CacheManagerFactory </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>eventListenerRegistry</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8:</strong> Sets a list of EHCache <code>net.sf.ehcache.event.CacheEventListener</code> for all new caches- no need to define it per cache in EHCache xml config anymore. <br c lear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> org.apache.camel.component.cache.CacheEventListenerRegistry </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cacheLoaderRegistry</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.8:</strong> Sets a list of <code>org.apache.camel.component.cache.CacheLoaderWrapper</code> that extends EHCache <code>net.sf.ehcache.loader.CacheLoader</code> for all new caches- no need to define it per cache in EHCache xml config anymore. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> org.apache.camel.component.cache.CacheLoaderRegistry </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>key</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>null</code> </p ></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel >2.10:</strong> To configure using a cache key by default. If a key is >provided in the message header, then the key from the header takes >precedence. </p></td></tr><tr><td colspan="1" rowspan="1" >class="confluenceTd"><p> <code>operation</code> </p></td><td colspan="1" >rowspan="1" class="confluenceTd"><p> <code>null</code> </p></td><td >colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.10:</strong> >To configure using an cache operation by default. If an operation in the >message header, then the operation from the header takes precedence. ></p></td></tr></tbody></table></div> -<h3 id="Cache-CacheComponentoptions">Cache Component options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Default Value </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>configuration</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> To use a custom <code>org.apache.camel.component.cache.CacheConfiguration</code> configuration. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>cacheManagerFactory</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> To use a custom <code>org.apache.camel.component.cache.CacheManagerFactory</code>. </p></td></tr><tr>< td colspan="1" rowspan="1" class="confluenceTd"><p> <code>configurationFile</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.13/2.12.3:</strong> To configure the location of the <code>ehcache.xml</code> file to use, such as <code>classpath:com/foo/mycache.xml</code> to load from classpath. If no configuration is given, then the default settings from EHCache is used. </p></td></tr></tbody></table></div> -<h3 id="Cache-Sending/ReceivingMessagesto/fromthecache"><span style="line-height: 1.5625;">Sending/Receiving Messages to/from the cache</span></h3><h4 id="Cache-MessageHeadersuptoCamel2.7">Message Headers up to Camel 2.7</h4><div class="confluenceTableSmall"> -<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Header </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CACHE_OPERATION</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The operation to be performed on the cache. Valid options are</p> -<ul class="alternate"><li>GET</li><li>CHECK</li><li>ADD</li><li>UPDATE</li><li>DELETE</li><li>DELETEALL<br clear="none" class="atl-forced-newline"> -<code>GET</code> and <code>CHECK</code> requires <strong>Camel 2.3</strong> onwards. </li></ul> -</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CACHE_KEY</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The cache key used to store the Message in the cache. The cache key is optional if the CACHE_OPERATION is DELETEALL </p></td></tr></tbody></table></div> -</div><h4 id="Cache-MessageHeadersCamel2.8+">Message Headers Camel 2.8+</h4> <div class="aui-message hint shadowed information-macro"> +</div></div><p>You can append query options to the URI in the following format, <code>?option=value&option=#beanRef&...</code></p><h3 id="Cache-Options">Options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>maxElementsInMemory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>1000</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of elements that may be stored in the defined cache</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>memoryStoreEvictionPolicy</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>MemoryStoreEvictionPolicy.LFU</code></p></td><td colspan="1" rowspan="1" class ="confluenceTd"><p>The number of elements that may be stored in the defined cache. Options include</p><ul class="alternate"><li>MemoryStoreEvictionPolicy.LFU - Least frequently used</li><li>MemoryStoreEvictionPolicy.LRU - Least recently used</li><li>MemoryStoreEvictionPolicy.FIFO - first in first out, the oldest element by creation time</li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>overflowToDisk</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Specifies whether cache may overflow to disk</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>eternal</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Sets whether elements are eternal. If eternal, timeouts are ignored and the<br clear="none" class="atl-forced-newline"> element never expires.< /p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>timeToLiveSeconds</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>300</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The maximum time between creation time and when an element expires.<br clear="none" class="atl-forced-newline"> Is used only if the element is not eternal</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>timeToIdleSeconds</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>300</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The maximum amount of time between accesses before an element expires</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>diskPersistent</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Whether the disk store persists between restarts of the Virtua l Machine.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>diskExpiryThreadIntervalSeconds</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>120</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The number of seconds between runs of the disk expiry thread.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cacheManagerFactory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> If you want to use a custom factory which instantiates and creates the EHCache <code>net.sf.ehcache.CacheManager</code>. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> abstract org.apache.camel.component.cache.CacheManagerFactory</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>eventListenerRegistry</code></p></td><td c olspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Sets a list of EHCache <code>net.sf.ehcache.event.CacheEventListener</code> for all new caches- no need to define it per cache in EHCache xml config anymore. <br clear="none" class="atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> org.apache.camel.component.cache.CacheEventListenerRegistry</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cacheLoaderRegistry</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.8:</strong> Sets a list of <code>org.apache.camel.component.cache.CacheLoaderWrapper</code> that extends EHCache <code>net.sf.ehcache.loader.CacheLoader</code> for all new caches- no need to define it per cache in EHCache xml config anymore. <br clear="none" class= "atl-forced-newline"> <br clear="none" class="atl-forced-newline"> <em>Type:</em> org.apache.camel.component.cache.CacheLoaderRegistry</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>key</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> To configure using a cache key by default. If a key is provided in the message header, then the key from the header takes precedence.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>operation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>null</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.10:</strong> To configure using an cache operation by default. If an operation in the message header, then the operation from the header takes precedence.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>ob jectCache</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.15:</strong> Whether to turn on allowing to store non serializable objects in the cache. If this option is enabled then overflow to disk cannot be enabled as well.</td></tr></tbody></table></div><h3 id="Cache-CacheComponentoptions">Cache Component options</h3><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>configuration</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a custom <code>org.apache.camel.component.cache.CacheConfiguration</code> config uration.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>cacheManagerFactory</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>To use a custom <code>org.apache.camel.component.cache.CacheManagerFactory</code>.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>configurationFile</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.13/2.12.3:</strong> To configure the location of the <code>ehcache.xml</code> file to use, such as <code>classpath:com/foo/mycache.xml</code> to load from classpath. If no configuration is given, then the default settings from EHCache is used.</p></td></tr></tbody></table></div><h3 id="Cache-Sending/ReceivingMessagesto/fromthecache"><span style="line-height: 1.5625;">Sending/Receiving Messages to/from the cache</span></h3><h4 id= "Cache-MessageHeadersuptoCamel2.7">Message Headers up to Camel 2.7</h4><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CACHE_OPERATION</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The operation to be performed on the cache. Valid options are</p><ul class="alternate"><li>GET</li><li>CHECK</li><li>ADD</li><li>UPDATE</li><li>DELETE</li><li>DELETEALL<br clear="none" class="atl-forced-newline"> <code>GET</code> and <code>CHECK</code> requires <strong>Camel 2.3</strong> onwards.</li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CACHE_KEY</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The cache key used to store the Message in the cache. The cache key is optional i f the CACHE_OPERATION is DELETEALL</p></td></tr></tbody></table></div></div><h4 id="Cache-MessageHeadersCamel2.8+">Message Headers Camel 2.8+</h4> <div class="aui-message hint shadowed information-macro"> <p class="title">Header changes in Camel 2.8</p> <span class="aui-icon icon-hint">Icon</span> <div class="message-content"> <p>The header names and supported values have changed to be prefixed with 'CamelCache' and use mixed case. This makes them easier to identify and keep separate from other headers. The CacheConstants variable names remain unchanged, just their values have been changed. Also, these headers are now removed from the exchange after the cache operation is performed.</p> </div> </div> -<div class="confluenceTableSmall"> -<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Header </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelCacheOperation</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The operation to be performed on the cache. The valid options are</p> -<ul class="alternate"><li>CamelCacheGet</li><li>CamelCacheCheck</li><li>CamelCacheAdd</li><li>CamelCacheUpdate</li><li>CamelCacheDelete</li><li>CamelCacheDeleteAll</li></ul> -</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelCacheKey</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The cache key used to store the Message in the cache. The cache key is optional if the CamelCacheOperation is CamelCacheDeleteAll </p></td></tr></tbody></table></div> -</div><p>The <code>CamelCacheAdd</code> and <code>CamelCacheUpdate</code> operations support additional headers:</p><div class="confluenceTableSmall"> -<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Header </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Type </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelCacheTimeToLive</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>Integer</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> Time to live in seconds. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelCacheTimeToIdle</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>Integer</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> Time to idle in seconds. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>CamelCacheEternal</code> </p></td><td colspa n="1" rowspan="1" class="confluenceTd"><p> <code>Boolean</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>Camel 2.11:</strong> Whether the content is eternal. </p></td></tr></tbody></table></div> -</div><h4 id="Cache-CacheProducer">Cache Producer</h4><p>Sending data to the cache involves the ability to direct payloads in exchanges to be stored in a pre-existing or created-on-demand cache. The mechanics of doing this involve</p><ul class="alternate"><li>setting the Message Exchange Headers shown above.</li><li>ensuring that the Message Exchange Body contains the message directed to the cache</li></ul><h4 id="Cache-CacheConsumer">Cache Consumer</h4><p>Receiving data from the cache involves the ability of the CacheConsumer to listen on a pre-existing or created-on-demand Cache using an event Listener and receive automatic notifications when any cache activity take place (i.e CamelCacheGet/CamelCacheUpdate/CamelCacheDelete/CamelCacheDeleteAll). Upon such an activity taking place</p><ul class="alternate"><li>an exchange containing Message Exchange Headers and a Message Exchange Body containing the just added/updated payload is placed and sent.</li><li>in case of a CamelCacheDelete All operation, the Message Exchange Header CamelCacheKey and the Message Exchange Body are not populated.</li></ul><h4 id="Cache-CacheProcessors">Cache Processors</h4><p>There are a set of nice processors with the ability to perform cache lookups and selectively replace payload content at the</p><ul class="alternate"><li>body</li><li>token</li><li>xpath level</li></ul><h3 id="Cache-CacheUsageSamples">Cache Usage Samples</h3><h4 id="Cache-Example1:Configuringthecache">Example 1: Configuring the cache</h4><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelCacheOperation</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The operation to be performed on the cache. The valid options are</p><ul class="alternate"><li>CamelCacheGet</li><li>CamelCacheCheck</li><li>CamelCacheAdd</li><li>CamelCacheUpdate</li><li>CamelCacheDelete</li><li>CamelCacheDeleteAll</li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelCacheKey</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The cache key used to store the Message in the cache. The cache key is optional if the CamelCacheOperation is CamelCacheDeleteAll</p></td></tr></tbody></table></div></div><p>The <code>CamelCacheAdd</code> and <code>CamelCacheUpdate</code> operations support additional headers:</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Header</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Type</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelCacheTimeToLive</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Integer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> Time to live in seconds.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelCacheTimeToIdle</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Integer</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> Time to idle in seconds.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>CamelCacheEternal</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Boolean</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.11:</strong> Whether the content is eternal.</p></td></tr></tbody></table></div></div><h4 id="Cache-CacheProducer">Cache Producer</h4><p>Sending data to the cache involves the ability to direct payloads in exchanges to be stored in a pre-existing or created-on-demand cache. The mechanics of doing this involve</p><ul class="alternate"><li>setting the Message Exchange Headers shown above.</li><li>ensuring that the Message Exchange Body contains the message directed to the cache</li></ul><h4 id="Cache-CacheConsumer">Cache Consumer</h4><p>Receiving data from the cache involves the ability of the CacheConsumer to listen on a pre-existing or created-on-demand Cache using an event Listener and receive automatic notifications when any cache activity take place (i.e Camel CacheGet/CamelCacheUpdate/CamelCacheDelete/CamelCacheDeleteAll). Upon such an activity taking place</p><ul class="alternate"><li>an exchange containing Message Exchange Headers and a Message Exchange Body containing the just added/updated payload is placed and sent.</li><li>in case of a CamelCacheDeleteAll operation, the Message Exchange Header CamelCacheKey and the Message Exchange Body are not populated.</li></ul><h4 id="Cache-CacheProcessors">Cache Processors</h4><p>There are a set of nice processors with the ability to perform cache lookups and selectively replace payload content at the</p><ul class="alternate"><li>body</li><li>token</li><li>xpath level</li></ul><h3 id="Cache-CacheUsageSamples">Cache Usage Samples</h3><h4 id="Cache-Example1:Configuringthecache">Example 1: Configuring the cache</h4><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[from("cache://MyApplicationCache" + "?maxElementsInMemory=1000" + "&memoryStoreEvictionPolicy=" + Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available.