<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>Again, this is a feature from Coherence[1].</div><div><br></div><div>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.&nbsp;several times every millisecond) the response will be fast and the system will not be overloaded.&nbsp;</div><div>E.g.&nbsp;</div><div><pre xml:space="preserve" class="oac_no_warn">Filter filter = new AndFilter(new EqualsFilter("getTrader", traderid),
                              new EqualsFilter("getStatus", Status.OPEN));</pre><pre xml:space="preserve" class="oac_no_warn"><pre xml:space="preserve" class="oac_no_warn">ContinuousQueryCache cacheOpenTrades = new ContinuousQueryCache(cache, filter);</pre><pre xml:space="preserve" class="oac_no_warn"><br></pre><pre xml:space="preserve" class="oac_no_warn"><pre xml:space="preserve" class="oac_no_warn"><pre xml:space="preserve" class="oac_no_warn">Iterator iter = cacheOpenTrades.entrySet().iterator(); //*this entrySet call will be instant!*</pre><pre xml:space="preserve" class="oac_no_warn"><br></pre><pre xml:space="preserve" class="oac_no_warn">FOr a full list of scenario in which this can be used take a look at [1].</pre><pre xml:space="preserve" class="oac_no_warn">Shall we consider adding something similar?</pre><pre xml:space="preserve" class="oac_no_warn"><br></pre><pre xml:space="preserve" class="oac_no_warn">Cheers,</pre><pre xml:space="preserve" class="oac_no_warn">Mircea</pre></pre></pre><pre xml:space="preserve" class="oac_no_warn"><pre xml:space="preserve" class="oac_no_warn"><font class="Apple-style-span" face="Helvetica"><span class="Apple-style-span" style="white-space: normal;"><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="white-space: pre;"><br></span></font></span></font></pre><pre xml:space="preserve" class="oac_no_warn"><br></pre><pre xml:space="preserve" class="oac_no_warn">[1] <a href="http://download.oracle.com/docs/cd/E14526_01/coh.350/e14509/continuousquery.htm#BABBEIAH">http://download.oracle.com/docs/cd/E14526_01/coh.350/e14509/continuousquery.htm#BABBEIAH</a></pre></pre></pre></div></body></html>