ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkulichenko <valentin.kuliche...@gmail.com>
Subject Re: IgniteCache evict vs clear
Date Mon, 05 Oct 2015 23:07:17 GMT
Hi Kevin,

My answers are inline...

kevin wrote
> 1. Is the difference between "evict" and "clear" that "evict" will remove
> entries from cache, but will move them to off-heap or swap if configured,
> and "clear" will remove entries from the cache as well as off-heap memory
> and swap storage?

Your understanding is correct.

kevin wrote
> 2. On IgniteCache, there are "clear" and "localClear" APIs. However, there
> is only a localEvict API, but no (global) "evict". Does the localEvict
> method actually only evict entries in the local node? Is there a way to do
> global evict?

Yes, you can only evict entry that is cached locally. If you need to evict
entry that resides on a remote node, you can use IgniteCompute.affinityRun()
method to send a closure to the primary node for this key and call
localEvict in this closure.


View this message in context: http://apache-ignite-users.70518.x6.nabble.com/IgniteCache-evict-vs-clear-tp1552p1553.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message