Hi!

IgniteCache#close doesn’t clear data by contract for non local caches

/**
 * Closes this cache instance.
 * <p>
 * For local cache equivalent to {@link #destroy()}.
 * For distributed caches, if called on clients, stops client cache, if called 
on a server node,
 * just closes this cache instance and does not destroy cache data.
 * <p>
 * After cache instance is closed another {@link IgniteCache} instance for the 
same
 * cache can be created using {@link Ignite#cache(String)} method.
 */
To clear cache data you must invoke IgniteCache#clear() it’s will clear cache 
contents

Ignite doesn’t have method to clean data in all cache, but you can use

Ignite#cacheNames(cacheName -> Ignite#cache(cacheName).clear())

With best regards
Alisher Alimov
alimovalis...@gmail.com




> On 11 авг. 2016 г., at 10:14, Alexey Kuznetsov <akuznet...@gridgain.com> 
> wrote:
> 
> Hi, Ravi.
> 
> You may close all caches and recreate them (from code).
> Will this work in your case?
> 
> On Thu, Aug 11, 2016 at 2:04 PM, Ravi Puri <ravikumarpur...@gmail.com 
> <mailto:ravikumarpur...@gmail.com>> wrote:
> I want to clear all the data cached in server and client nodes. So how to do
> it as i have to do it another class.
> 
> 
> 
> --
> View this message in context: 
> http://apache-ignite-users.70518.x6.nabble.com/Clear-the-cached-data-tp6946.html
>  
> <http://apache-ignite-users.70518.x6.nabble.com/Clear-the-cached-data-tp6946.html>
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
> 
> 
> 
> --
> Alexey Kuznetsov
> GridGain Systems
> www.gridgain.com <http://www.gridgain.com/>

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to