On 29 Sep 2009, at 09:57, Mircea Markus wrote:
Again, this is a feature from Coherence.
Basic idea is to execute a query against the cache, and hold the
result object. This result object will always have up to date query
result; this means that whenever something is modified in the cache
the result itself is updated. Advantage: if one performs the same
query very often(e.g. several times every millisecond) the response
will be fast and the system will not be overloaded.
Is it really faster? Surely all you save is the construction of the
various query objects, but the query itself would have to be re-run
every time. Or does it attach a listener to the cache and check
whether any new additions/removals should be used to update the result
set? I don't see how that could be much faster though.
Adding Hibernate-dev in cc so that the HIbernate Search guys can
Filter filter = new AndFilter(new EqualsFilter("getTrader", traderid),
ContinuousQueryCache cacheOpenTrades = new ContinuousQueryCache
Iterator iter = cacheOpenTrades.entrySet().iterator(); //*this
entrySet call will be instant!*
FOr a full list of scenario in which this can be used take a look at
Shall we consider adding something similar?
infinispan-dev mailing list
Lead, JBoss Cache