camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Volodymyr Buell <vbu...@gmail.com>
Subject Get/check operation for camel-cache
Date Tue, 27 Apr 2010 14:01:49 GMT
Hi,

Patch for reading operations for camel-cache component has been
attached in Jira. String constants were extracted into CacheConstants
interface.

GET command usage:

                    setHeader(CacheConstants.CACHE_OPERATION,
constant(CacheConstants.CACHE_OPERATION_GET)).
                    setHeader(CacheConstants.CACHE_KEY,
constant("Ralph_Waldo_Emerson")).
                    to("cache://TestCache1").

choice().when(header(CacheConstants.CACHE_ELEMENT_WAS_FOUND).isNotNull()).
                    to("direct:getCWAF")

Check command tests existence of entry in the cache but don't modify
body of exchange.

Example of CHECK command usage:

                    setHeader(CacheConstants.CACHE_OPERATION,
constant(CacheConstants.CACHE_OPERATION_CHECK)).
                    setHeader(CacheConstants.CACHE_KEY,
constant("Ralph_Waldo_Emerson")).
                    to("cache://TestCache1").

choice().when(header(CacheConstants.CACHE_ELEMENT_WAS_FOUND).isNotNull()).
                    to("direct:getCWAF")


https://issues.apache.org/activemq/browse/CAMEL-2603

-- 
Thanks,
Volodymyr

Mime
View raw message