HI,

IgniteCache implements Iterable interface. So you can just iterate
throughout all entries using for-each:

        for (Cache.Entry<Object, Object> entry : cache) {
            // do smth with entry
        }

It will be the same as using ScanQuery.

On Wed, Mar 23, 2016 at 12:00 PM, Ambha <[email protected]> wrote:

> I have a IgniteCache and need to get all the cache entries when it is not
> possible to provide keys and also there is no query criteria/predicate.
>
> One possible solution I can think  of is to create a ScanQuery with a
> IgniteByPredicate which returns true by default from apply() method. Is
> there any other optimal or alternative way of achieving the same
>
>
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/get-all-from-IgniteCache-when-keys-are-unknown-and-query-criteria-is-missing-tp3633.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Andrey Gura
GridGain Systems, Inc.
www.gridgain.com

Reply via email to