Dmitriy,
It seems the JCache spec doesn't explicitly require the cache data to be 
destroyed by a Cache.close() call. See page 38. 
The way I interpret (perhaps incorrectly) the semantics on the close() is more 
like closing of an OS file: all data structures and buffers allocated and 
managed by the OS kernel on behalf of an application get released, but the file 
and its data are still there. It's just the application no longer holds a 
handle to it... 
Essentially, Cache.close() closes a specific *instance* of the cache class. 
That instance becomes unusable from this moment on, but other instances of the 
Cache class for the same named cache may still be alive and kickin'.According 
to the spec to actually destroy the cache and its data one should use 
CacheManager.destroyCache(cacheName) instead.RegardsAndrey
    _____________________________
From: Dmitriy Setrakyan <dsetrak...@apache.org>
Sent: Thursday, April 30, 2015 6:34 PM
Subject: Re: javax.cache close()
To:  <dev@ignite.incubator.apache.org>


                   On Thu, Apr 30, 2015 at 3:27 PM, Ognen Duzlevski 
<ognen.duzlev...@gmail.com>   
 wrote:   
    
 > This may not be a question for the dev list - can someone point me to a   
 > javadoc explaining the close() method on a javax cache (and hence ignite   
 > cache)?   
 >   
 > I have found (in a most unpleasant way ;) that .close() on a cache closes   
 > the cache not only for the current client using it but for everyone   
 > (basically deletes if off the ignite cluster).   
 >   
    
 Added this javadoc in "ignite-sprint-4" branch: Completely deletes the   
 cache with all its data from the system on all cluster nodes.   
    
 Should get into the next release.   
    
    
 >   
 > Thanks!   
 >

Reply via email to